mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-11 03:55:31 +00:00
Fixed bug 3697 - Main thread gets stuck on left mouse down
Eric Wasylishen I think I found a better fix. The problem with https://hg.libsdl.org/SDL/rev/ebdc0738b1b5 is setting the styleMask to 0 clears the NSWindowStyleMaskFullScreen bit, which then confuses Cocoa later when you try to leave fullscreen. Instead I'm just clearing the NSWindowStyleMaskResizable bit, although SetWindowStyle(window, NSWindowStyleMaskFullScreen); seems to also work.
This commit is contained in:
parent
6391cc3fef
commit
997c69b9ef
|
@ -667,6 +667,8 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
|
||||||
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification
|
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification
|
||||||
{
|
{
|
||||||
SDL_Window *window = _data->window;
|
SDL_Window *window = _data->window;
|
||||||
|
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||||
|
NSWindow *nswindow = data->nswindow;
|
||||||
|
|
||||||
inFullscreenTransition = NO;
|
inFullscreenTransition = NO;
|
||||||
|
|
||||||
|
@ -674,6 +676,11 @@ SetWindowStyle(SDL_Window * window, NSUInteger style)
|
||||||
pendingWindowOperation = PENDING_OPERATION_NONE;
|
pendingWindowOperation = PENDING_OPERATION_NONE;
|
||||||
[self setFullscreenSpace:NO];
|
[self setFullscreenSpace:NO];
|
||||||
} else {
|
} else {
|
||||||
|
/* Unset the resizable flag.
|
||||||
|
This is a workaround for https://bugzilla.libsdl.org/show_bug.cgi?id=3697
|
||||||
|
*/
|
||||||
|
SetWindowStyle(window, [nswindow styleMask] & (~NSWindowStyleMaskResizable));
|
||||||
|
|
||||||
if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
||||||
[NSMenu setMenuBarVisible:NO];
|
[NSMenu setMenuBarVisible:NO];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue