Skip to content

Commit

Permalink
Try Fix 1
Browse files Browse the repository at this point in the history
  • Loading branch information
proneon267 committed Dec 5, 2024
1 parent 081c5bf commit 4309601
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions android/src/toga_android/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,18 @@ def get_visible(self):
######################################################################

def get_window_state(self, in_progress_state=False):
decor_view = self.app.native.getWindow().getDecorView()
system_ui_flags = decor_view.getSystemUiVisibility()
if system_ui_flags & (
decor_view.SYSTEM_UI_FLAG_FULLSCREEN
| decor_view.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| decor_view.SYSTEM_UI_FLAG_IMMERSIVE
):
if self._in_presentation_mode:
return WindowState.PRESENTATION
else:
return WindowState.FULLSCREEN
if getattr(self, "app", None) is not None:
decor_view = self.app.native.getWindow().getDecorView()
system_ui_flags = decor_view.getSystemUiVisibility()
if system_ui_flags & (
decor_view.SYSTEM_UI_FLAG_FULLSCREEN
| decor_view.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| decor_view.SYSTEM_UI_FLAG_IMMERSIVE
):
if self._in_presentation_mode:
return WindowState.PRESENTATION
else:
return WindowState.FULLSCREEN
return WindowState.NORMAL

def set_window_state(self, state):
Expand Down

0 comments on commit 4309601

Please sign in to comment.