src/video/uikit/SDL_uikitwindow.m
changeset 6064 498e0234dfe6
parent 6044 35448a5ea044
child 6073 9738f2a8eee4
equal deleted inserted replaced
6063:44cd82d8ea65 6064:498e0234dfe6
    67         window->h = (int)uiwindow.frame.size.height;
    67         window->h = (int)uiwindow.frame.size.height;
    68     }
    68     }
    69 
    69 
    70     window->driverdata = data;
    70     window->driverdata = data;
    71 
    71 
    72     // !!! FIXME: should we force this? Shouldn't specifying FULLSCREEN
       
    73     // !!! FIXME:  imply BORDERLESS?
       
    74     window->flags |= SDL_WINDOW_FULLSCREEN;        /* window is always fullscreen */
       
    75     window->flags |= SDL_WINDOW_SHOWN;            /* only one window on iOS, always shown */
    72     window->flags |= SDL_WINDOW_SHOWN;            /* only one window on iOS, always shown */
    76 
    73 
    77     // SDL_WINDOW_BORDERLESS controls whether status bar is hidden.
    74     // SDL_WINDOW_BORDERLESS controls whether status bar is hidden.
    78     // This is only set if the window is on the main screen. Other screens
    75     // This is only set if the window is on the main screen. Other screens
    79     //  just force the window to have the borderless flag.
    76     //  just force the window to have the borderless flag.
    82         window->flags &= ~SDL_WINDOW_INPUT_FOCUS;  // never has input focus
    79         window->flags &= ~SDL_WINDOW_INPUT_FOCUS;  // never has input focus
    83         window->flags |= SDL_WINDOW_BORDERLESS;  // never has a status bar.
    80         window->flags |= SDL_WINDOW_BORDERLESS;  // never has a status bar.
    84     } else {
    81     } else {
    85         window->flags |= SDL_WINDOW_INPUT_FOCUS;  // always has input focus
    82         window->flags |= SDL_WINDOW_INPUT_FOCUS;  // always has input focus
    86 
    83 
    87         if (window->flags & SDL_WINDOW_BORDERLESS) {
    84         if (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS)) {
    88             [UIApplication sharedApplication].statusBarHidden = YES;
    85             [UIApplication sharedApplication].statusBarHidden = YES;
    89         } else {
    86         } else {
    90             [UIApplication sharedApplication].statusBarHidden = NO;
    87             [UIApplication sharedApplication].statusBarHidden = NO;
    91         }
    88         }
    92 
    89 
   165     }
   162     }
   166 
   163 
   167     /* ignore the size user requested, and make a fullscreen window */
   164     /* ignore the size user requested, and make a fullscreen window */
   168     // !!! FIXME: can we have a smaller view?
   165     // !!! FIXME: can we have a smaller view?
   169     UIWindow *uiwindow = [UIWindow alloc];
   166     UIWindow *uiwindow = [UIWindow alloc];
   170     if (window->flags & SDL_WINDOW_BORDERLESS)
   167     if (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS))
   171         uiwindow = [uiwindow initWithFrame:[uiscreen bounds]];
   168         uiwindow = [uiwindow initWithFrame:[uiscreen bounds]];
   172     else
   169     else
   173         uiwindow = [uiwindow initWithFrame:[uiscreen applicationFrame]];
   170         uiwindow = [uiwindow initWithFrame:[uiscreen applicationFrame]];
   174 
   171 
   175     // put the window on an external display if appropriate. This implicitly
   172     // put the window on an external display if appropriate. This implicitly