Skip to content

Commit

Permalink
Merge pull request kivy#6589 from misl6/fix-ios-fullscreen
Browse files Browse the repository at this point in the history
Add the ability to show statusbar on iOS
  • Loading branch information
tshirtman authored Dec 24, 2019
2 parents 46cfa42 + b29a1b2 commit 38fcbd5
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions kivy/core/window/_window_sdl2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 38fcbd5

Please sign in to comment.