From b29a1b2400852ba15a323cfcf34c089d3f24fbae Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Tue, 5 Nov 2019 12:56:20 +0100 Subject: [PATCH] Add the ability to show statusbar on iOS --- kivy/core/window/_window_sdl2.pyx | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/kivy/core/window/_window_sdl2.pyx b/kivy/core/window/_window_sdl2.pyx index 7bbc1767b..af2af3914 100644 --- a/kivy/core/window/_window_sdl2.pyx +++ b/kivy/core/window/_window_sdl2.pyx @@ -77,23 +77,25 @@ cdef class _WindowSDL2Storage: resizable, state, gl_backend): self.win_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI - if USE_IOS: - self.win_flags |= SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_FULLSCREEN_DESKTOP - else: - if resizable: - self.win_flags |= SDL_WINDOW_RESIZABLE + if resizable: + self.win_flags |= SDL_WINDOW_RESIZABLE + + if not USE_IOS: if borderless: self.win_flags |= SDL_WINDOW_BORDERLESS - if USE_ANDROID: - # Android is handled separately because it is important to create the window with - # the same fullscreen setting as AndroidManifest.xml. - if environ.get('P4A_IS_WINDOWED', 'True') == 'False': - self.win_flags |= SDL_WINDOW_FULLSCREEN - elif fullscreen == 'auto': - self.win_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP - elif fullscreen is True: + if USE_ANDROID: + # Android is handled separately because it is important to create the window with + # the same fullscreen setting as AndroidManifest.xml. + if environ.get('P4A_IS_WINDOWED', 'True') == 'False': self.win_flags |= SDL_WINDOW_FULLSCREEN + elif USE_IOS: + if environ.get('IOS_IS_WINDOWED', 'True') == 'False': + self.win_flags |= SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS + elif fullscreen == 'auto': + self.win_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP + elif fullscreen is True: + self.win_flags |= SDL_WINDOW_FULLSCREEN if state == 'maximized': self.win_flags |= SDL_WINDOW_MAXIMIZED elif state == 'minimized':