=> 001aeda1724eea630dd141c642bbdd61e2b9b69a
[1mdiff --git a/CMakeLists.txt b/CMakeLists.txt[m [1mindex 32f8afb2..94b70ea0 100644[m [1m--- a/CMakeLists.txt[m [1m+++ b/CMakeLists.txt[m [36m@@ -31,7 +31,7 @@[m [mendif ()[m [m # Defaults that depend on environment.[m set (DEFAULT_RESIZE_DRAW ON)[m [31m-if (HAIKU)[m [32m+[m[32mif (HAIKU OR ANDROID)[m set (DEFAULT_RESIZE_DRAW OFF)[m endif ()[m set (DEFAULT_IDLE_SLEEP OFF)[m [1mdiff --git a/src/app.c b/src/app.c[m [1mindex f5f7ae2b..27c8bef7 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -3432,8 +3432,21 @@[m [mvoid closePopups_App(void) {[m }[m [m #if defined (iPlatformAndroidMobile)[m [32m+[m float displayDensity_Android(void) {[m iApp *d = &app_;[m return toFloat_String(at_CommandLine(&d->args, 1));[m }[m [32m+[m [32m+[m[32m#include[m [32m+[m [32m+[m[32mJNIEXPORT void JNICALL Java_fi_skyjake_lagrange_SDLActivity_postAppCommand([m [32m+[m[32m JNIEnv* env, jclass jcls,[m [32m+[m[32m jstring command)[m [32m+[m[32m{[m [32m+[m[32m const char *cmd = (*env)->GetStringUTFChars(env, command, NULL);[m [32m+[m[32m postCommand_Root(NULL, cmd);[m [32m+[m[32m (*env)->ReleaseStringUTFChars(env, command, cmd);[m [32m+[m[32m}[m [32m+[m #endif[m [1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex 0977da4a..04257a1c 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -3100,11 +3100,6 @@[m [mstatic void checkResponse_DocumentWidget_(iDocumentWidget *d) {[m NULL);[m insertChildAfter_Widget(buttons, iClob(lineBreak), 0);[m }[m [31m- else {[m [31m-#if !defined (iPlatformAppleMobile)[m [31m- lineBreak = new_LabelWidget("${dlg.input.linebreak}", "text.insert arg:10");[m [31m-#endif[m [31m- }[m if (lineBreak) {[m setFlags_Widget(as_Widget(lineBreak), frameless_WidgetFlag, iTrue);[m setTextColor_LabelWidget(lineBreak, uiTextDim_ColorId);[m [1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m [1mindex 24983d69..2de16e6e 100644[m [1m--- a/src/ui/inputwidget.c[m [1m+++ b/src/ui/inputwidget.c[m [36m@@ -1269,8 +1269,8 @@[m [mvoid end_InputWidget(iInputWidget *d, iBool accept) {[m if (!accept) {[m /* Overwrite the edited lines. */[m splitToLines_(&d->oldText, &d->lines);[m [31m- SDL_StopTextInput();[m }[m [32m+[m[32m SDL_StopTextInput();[m enableEditorKeysInMenus_(iTrue);[m d->inFlags &= ~isMarking_InputWidgetFlag;[m startOrStopCursorTimer_InputWidget_(d, iFalse);[m [36m@@ -2153,11 +2153,11 @@[m [mstatic iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {[m updateAfterVisualOffsetChange_InputWidget_(d, w->root);[m }[m }[m [31m- else if (d->sysCtrl && isCommand_UserEvent(ev, "menu.opened")) {[m [32m+[m[32m#endif[m [32m+[m[32m if (deviceType_App() != desktop_AppDeviceType && isCommand_UserEvent(ev, "menu.opened")) {[m setFocus_Widget(NULL);[m return iFalse;[m }[m [31m-#endif[m if (isCommand_Widget(w, ev, "focus.gained")) {[m if (contentBounds_InputWidget_(d).size.x < minWidth_InputWidget_) {[m setFocus_Widget(NULL);[m [1mdiff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c[m [1mindex c654e3cf..f14170ad 100644[m [1m--- a/src/ui/lookupwidget.c[m [1m+++ b/src/ui/lookupwidget.c[m [36m@@ -676,17 +676,19 @@[m [mstatic iBool processEvent_LookupWidget_(iLookupWidget *d, const SDL_Event *ev) {[m max_I2(zero_I2(),[m addX_I2(bottomLeft_Rect(bounds_Widget(url)),[m -extraWidth / 2))));[m [31m-#if defined(iPlatformAppleMobile)[m [32m+[m[32m#if defined(iPlatformMobile)[m /* TODO: Check this again. */[m /* Adjust height based on keyboard size. */ {[m w->rect.size.y = bottom_Rect(visibleRect_Root(root)) - top_Rect(bounds_Widget(w));[m [32m+[m[32m# if defined (iPlatformAppleMobile)[m if (deviceType_App() == phone_AppDeviceType) {[m [31m- float l, r;[m [32m+[m[32m float l = 0.0f, r = 0.0f;[m safeAreaInsets_iOS(&l, NULL, &r, NULL);[m w->rect.size.x = size_Root(root).x - l - r;[m w->rect.pos.x = l;[m /* TODO: Need to use windowToLocal_Widget? */[m }[m [32m+[m[32m# endif[m }[m #endif[m arrange_Widget(w);[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 9e264993..36ac948e 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -512,7 +512,10 @@[m [mstatic iBool handleRootCommands_(iWidget *root, const char *cmd) {[m else {[m addChild_Widget(root, iClob(sidebar));[m setWidth_SidebarWidget(sidebar, (float) width_Widget(root) / (float) gap_UI);[m [31m- const int midHeight = height_Widget(root) / 2;// + lineHeight_Text(uiLabelLarge_FontId);[m [32m+[m[32m int midHeight = height_Widget(root) / 2;// + lineHeight_Text(uiLabelLarge_FontId);[m [32m+[m[32m#if defined (iPlatformAndroidMobile)[m [32m+[m[32m midHeight += 2 * lineHeight_Text(uiLabelLarge_FontId);[m [32m+[m[32m#endif[m setMidHeight_SidebarWidget(sidebar, midHeight);[m setFixedSize_Widget(as_Widget(sidebar), init_I2(-1, midHeight));[m setPos_Widget(as_Widget(sidebar), init_I2(0, height_Widget(root) - midHeight));[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex d694146a..953d5ea4 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -1008,6 +1008,13 @@[m [miBool processEvent_Window(iWindow *d, const SDL_Event *ev) {[m postCommand_App("media.player.update"); /* in case a player needs updating */[m return iTrue;[m }[m [32m+[m[32m if (event.type == SDL_USEREVENT && isCommand_UserEvent(ev, "window.sysframe") && mw) {[m [32m+[m[32m /* This command is sent on Android to update the keyboard height. */[m [32m+[m[32m const char *cmd = command_UserEvent(ev);[m [32m+[m[32m setKeyboardHeight_MainWindow(mw, argLabel_Command(cmd, "fullheight") -[m [32m+[m[32m argLabel_Command(cmd, "bottom"));[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m if (processEvent_Touch(&event)) {[m return iTrue;[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).