From ff111132f41e72f864bb6747067a7f7f6b82511b Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 27 Nov 2024 18:11:10 +0100 Subject: [PATCH] android: Draw to whole window, ignoring contentRect This contentRect is quite odd and blocks out a big chunk at the top of the screen which doesn't really seem to correspond to anything --- direct/src/dist/commands.py | 2 +- panda/src/androiddisplay/androidGraphicsWindow.cxx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py index 7d022014e2..cfddcd89af 100644 --- a/direct/src/dist/commands.py +++ b/direct/src/dist/commands.py @@ -866,7 +866,7 @@ class build_apps(setuptools.Command): activity = ET.SubElement(application, 'activity') activity.set('android:name', 'org.panda3d.android.PythonActivity') activity.set('android:label', appname) - activity.set('android:theme', '@android:style/Theme.NoTitleBar') + activity.set('android:theme', '@android:style/Theme.NoTitleBar.Fullscreen') activity.set('android:alwaysRetainTaskState', 'true') activity.set('android:configChanges', 'layoutDirection|locale|grammaticalGender|fontScale|fontWeightAdjustment|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation') activity.set('android:launchMode', 'singleInstance') diff --git a/panda/src/androiddisplay/androidGraphicsWindow.cxx b/panda/src/androiddisplay/androidGraphicsWindow.cxx index eb388815d8..1cc59d8298 100644 --- a/panda/src/androiddisplay/androidGraphicsWindow.cxx +++ b/panda/src/androiddisplay/androidGraphicsWindow.cxx @@ -435,14 +435,15 @@ ns_handle_command(int32_t command) { case APP_CMD_WINDOW_RESIZED: properties.set_size(ANativeWindow_getWidth(_app->window), ANativeWindow_getHeight(_app->window)); + system_changed_properties(properties); break; case APP_CMD_WINDOW_REDRAW_NEEDED: break; case APP_CMD_CONTENT_RECT_CHANGED: - properties.set_origin(_app->contentRect.left, _app->contentRect.top); + /*properties.set_origin(_app->contentRect.left, _app->contentRect.top); properties.set_size(_app->contentRect.right - _app->contentRect.left, _app->contentRect.bottom - _app->contentRect.top); - system_changed_properties(properties); + system_changed_properties(properties);*/ break; case APP_CMD_GAINED_FOCUS: properties.set_foreground(true);