SDL_cocoawindow.m: update fullscreen toggle when SDL_SetWindowResizable called
parent
cc152103ba
commit
a164c9d245
|
@ -2020,9 +2020,19 @@ Cocoa_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable)
|
|||
*/
|
||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||
Cocoa_WindowListener *listener = data->listener;
|
||||
NSWindow *nswindow = data->nswindow;
|
||||
SDL_VideoData *videodata = ((SDL_WindowData *) window->driverdata)->videodata;
|
||||
if (![listener isInFullscreenSpace]) {
|
||||
SetWindowStyle(window, GetWindowStyle(window));
|
||||
}
|
||||
if (videodata->allow_spaces) {
|
||||
if (resizable) {
|
||||
/* resizable windows are Spaces-friendly: they get the "go fullscreen" toggle button on their titlebar. */
|
||||
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
} else {
|
||||
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorManaged];
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue