HACK: prevent window height of 0

For some reason some apps like LibreSudoku try to create Dialog and
Popup windows with height = 0. Prevent this on the window side until the
measurement error is fixed.
This commit is contained in:
Julian Winkler
2024-12-14 23:37:37 +01:00
parent 47fc749018
commit 167d3856e9
2 changed files with 7 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ public class Window {
}
public void setAttributes(WindowManager.LayoutParams params) {
set_layout(native_window, params.width, params.height);
setLayout(params.width, params.height);
}
public void takeSurface(SurfaceHolder.Callback2 callback) {}
@@ -105,6 +105,8 @@ public class Window {
public void setFormat(int format) {}
public void setLayout(int width, int height) {
if (height == 0) // FIXME: remove this hack once measurement error with composeUI dialogs is fixed
height = 500;
set_layout(native_window, width, height);
}