Skip to content

Commit

Permalink
iOS/tvOS: Always send SDL_WINDOWEVENT_FOCUS_GAINED when a window is c…
Browse files Browse the repository at this point in the history
…reated on the main screen (fixes bug #3395).
  • Loading branch information
slime73 committed Sep 24, 2016
1 parent 450fa8c commit 9165ba7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/video/uikit/SDL_uikitwindow.m
Expand Up @@ -99,9 +99,7 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo
/* only one window on iOS, always shown */
window->flags &= ~SDL_WINDOW_HIDDEN;

if (displaydata.uiscreen == [UIScreen mainScreen]) {
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
} else {
if (displaydata.uiscreen != [UIScreen mainScreen]) {
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizable */
window->flags &= ~SDL_WINDOW_INPUT_FOCUS; /* never has input focus */
window->flags |= SDL_WINDOW_BORDERLESS; /* never has a status bar. */
Expand Down

0 comments on commit 9165ba7

Please sign in to comment.