iOS/tvOS: Always send SDL_WINDOWEVENT_FOCUS_GAINED when a window is created on the main screen (fixes bug #3395).
authorAlex Szpakowski <slime73@gmail.com>
Sat, 24 Sep 2016 20:12:57 -0300
changeset 10367e88a4e5539e5
parent 10366 e1b52e69578b
child 10368 4842604f647a
iOS/tvOS: Always send SDL_WINDOWEVENT_FOCUS_GAINED when a window is created on the main screen (fixes bug #3395).
src/video/uikit/SDL_uikitwindow.m
     1.1 --- a/src/video/uikit/SDL_uikitwindow.m	Sat Sep 24 18:46:34 2016 -0300
     1.2 +++ b/src/video/uikit/SDL_uikitwindow.m	Sat Sep 24 20:12:57 2016 -0300
     1.3 @@ -99,9 +99,7 @@
     1.4      /* only one window on iOS, always shown */
     1.5      window->flags &= ~SDL_WINDOW_HIDDEN;
     1.6  
     1.7 -    if (displaydata.uiscreen == [UIScreen mainScreen]) {
     1.8 -        window->flags |= SDL_WINDOW_INPUT_FOCUS;  /* always has input focus */
     1.9 -    } else {
    1.10 +    if (displaydata.uiscreen != [UIScreen mainScreen]) {
    1.11          window->flags &= ~SDL_WINDOW_RESIZABLE;  /* window is NEVER resizable */
    1.12          window->flags &= ~SDL_WINDOW_INPUT_FOCUS;  /* never has input focus */
    1.13          window->flags |= SDL_WINDOW_BORDERLESS;  /* never has a status bar. */