mirror of https://github.com/encounter/SDL.git
iOS/tvOS: Always send SDL_WINDOWEVENT_FOCUS_GAINED when a window is created on the main screen (fixes bug #3395).
This commit is contained in:
parent
450fa8cdf9
commit
9165ba7ebd
|
@ -99,9 +99,7 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo
|
||||||
/* only one window on iOS, always shown */
|
/* only one window on iOS, always shown */
|
||||||
window->flags &= ~SDL_WINDOW_HIDDEN;
|
window->flags &= ~SDL_WINDOW_HIDDEN;
|
||||||
|
|
||||||
if (displaydata.uiscreen == [UIScreen mainScreen]) {
|
if (displaydata.uiscreen != [UIScreen mainScreen]) {
|
||||||
window->flags |= SDL_WINDOW_INPUT_FOCUS; /* always has input focus */
|
|
||||||
} else {
|
|
||||||
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizable */
|
window->flags &= ~SDL_WINDOW_RESIZABLE; /* window is NEVER resizable */
|
||||||
window->flags &= ~SDL_WINDOW_INPUT_FOCUS; /* never has input focus */
|
window->flags &= ~SDL_WINDOW_INPUT_FOCUS; /* never has input focus */
|
||||||
window->flags |= SDL_WINDOW_BORDERLESS; /* never has a status bar. */
|
window->flags |= SDL_WINDOW_BORDERLESS; /* never has a status bar. */
|
||||||
|
|
Loading…
Reference in New Issue