one last SDL fix: restore menu bar if we destroy a fullscreen window without transitioning it back to a non-fullscreen window first
parent
ebfb2ecb68
commit
5103ae9fd6
|
@ -642,6 +642,10 @@ SetWindowStyle(SDL_Window * window, unsigned int style)
|
||||||
{
|
{
|
||||||
SDL_Window *window = _data->window;
|
SDL_Window *window = _data->window;
|
||||||
|
|
||||||
|
if (window->is_destroying) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SetWindowStyle(window, GetWindowStyle(window));
|
SetWindowStyle(window, GetWindowStyle(window));
|
||||||
|
|
||||||
isFullscreenSpace = NO;
|
isFullscreenSpace = NO;
|
||||||
|
@ -688,6 +692,10 @@ SetWindowStyle(SDL_Window * window, unsigned int style)
|
||||||
{
|
{
|
||||||
SDL_Window *window = _data->window;
|
SDL_Window *window = _data->window;
|
||||||
|
|
||||||
|
if (window->is_destroying) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SetWindowStyle(window, (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask));
|
SetWindowStyle(window, (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask));
|
||||||
|
|
||||||
isFullscreenSpace = YES;
|
isFullscreenSpace = YES;
|
||||||
|
@ -1648,6 +1656,9 @@ Cocoa_DestroyWindow(_THIS, SDL_Window * window)
|
||||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
if ([data->listener isInFullscreenSpace]) {
|
||||||
|
[NSMenu setMenuBarVisible:YES];
|
||||||
|
}
|
||||||
[data->listener close];
|
[data->listener close];
|
||||||
[data->listener release];
|
[data->listener release];
|
||||||
if (data->created) {
|
if (data->created) {
|
||||||
|
|
Loading…
Reference in New Issue