From 22592e1ce3684671285dee7782213d9786c780cf Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Mon, 31 Jul 2023 11:58:51 +0300

Subject: [PATCH 1/1] Mobile: Fixed UI layout regressions

Keyboard height changes need to be applied and cause layout changes.

There would be better ways to handle screen orientation changes

(observe the actual events about them!).


src/app.c | 3 +++

src/ui/window.c | 21 +++++++++++++++++----

2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/app.c b/src/app.c

index 366037dd..f2a7c5be 100644

--- a/src/app.c

+++ b/src/app.c

@@ -2252,6 +2252,9 @@ static int resizeWatcher_(void *user, SDL_Event *event) {

}

iLocalDef iBool isResizeDrawEnabled_(void) {

#if defined (LAGRANGE_ENABLE_RESIZE_DRAW)

if defined (LAGRANGE_ENABLE_X11_XLIB)

 if (!isXSession_X11()) {

diff --git a/src/ui/window.c b/src/ui/window.c

index 8c2a36ac..5b8b4da3 100644

--- a/src/ui/window.c

+++ b/src/ui/window.c

@@ -1577,14 +1577,27 @@ void draw_MainWindow(iMainWindow *d) {

 setCurrent_Text(d->base.text);

 /* Check if root needs resizing. */ {

     const iBool wasPortrait = isPortrait_App();

-// iInt2 renderSize;

-// SDL_GetRendererOutputSize(w->render, &renderSize.x, &renderSize.y);

+#if defined (iPlatformMobile)

+#else

     if (updateSize_MainWindow_(d, iTrue)) {

         if (isPortrait_App() != wasPortrait) {

         }

     }

+#endif

     /* TODO: On macOS, a detached popup window will mess up the main window's rendering

        completely. Looks like a render target mixup. macOS builds normally use native menus,

        though, so leaving it in. */

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.10/patch/22592e1ce3684671285dee7782213d9786c780cf.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
71.809617 milliseconds
Gemini-to-HTML Time
1.511159 milliseconds

This content has been proxied by September (ba2dc).