You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Triage rationale: Blocare de evenimente/UI sau ANR raportat; verificați versiunea și scenariul înainte de fix.
This is an attributed tracking copy, not a locally reproduced or confirmed Graphix defect. Applicability, affected versions and ownership still require validation. No automatic synchronization or resolution is implied. Original descriptions and comments are preserved literally in Markdown code blocks to avoid notifying mentioned users or resolving SDL references against Graphix. Attachments, logs, patches and other linked resources remain at their original URLs; external resource contents and edit/event histories are not copied.
Graphix validation checklist
Read the current upstream issue and discussion.
Establish affected versions/platforms and whether Graphix is affected.
Reproduce the reported behavior and identify the invariant owner.
Implement an ownership-correct fix or document an upstream/external resolution.
Verify regression coverage and applicable platform/runtime gates.
Original description
# This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
*[Fix (Proposed patch.rtf, text/plain, 2017-07-08 15:53:24 +0000, 924 bytes)](https://bugzilla.libsdl.org/attachment.cgi?id=2793)*[Fix exiting fullscreen desktop (fix_exit_fullscreen_desktop.diff, text/plain, 2017-08-02 03:09:25 +0000, 1129 bytes)](https://bugzilla.libsdl.org/attachment.cgi?id=2815)**Reported in version:** HG 2.1
**Reported for operating system, platform:** Other, x86
# Comments on the original bug report:
On 2017-07-07 07:21:24 +0000, Amruth Raj wrote:
> - My app runs in full screen to play video(I use SDL_WINDOW_FULLSCREEN_DESKTOP)> - Cmd-tab to go out of full screen to another app> - Cmd-tab again to get back to my app> - Press left mouse button at one of the edges of the screen, don't release yet.> After this point the main thread is stuck until I release the left mouse button and hence video rendering doesn't happen anymore.> > On debugging more, I see that thread 0 is stuck as shown below with sendEvent processing left mouse down. It comes out only after it receives a left mouse up. There are some frames below which show NSWindowResizing, but my window flag doesn't have SDL_WINDOW_RESIZABLE set.>> ```> Thread 0:: CrBrowserMain Dispatch queue: com.apple.main-thread> 0 libsystem_kernel.dylib 0x00007fffbe13d34a mach_msg_trap + 10> 1 libsystem_kernel.dylib 0x00007fffbe13c797 mach_msg + 55> 2 com.apple.CoreFoundation 0x00007fffa889d434 __CFRunLoopServiceMachPort + 212> 3 com.apple.CoreFoundation 0x00007fffa889c8c1 __CFRunLoopRun + 1361> 4 com.apple.CoreFoundation 0x00007fffa889c114 CFRunLoopRunSpecific + 420> 5 com.apple.HIToolbox 0x00007fffa7dfdebc RunCurrentEventLoopInMode + 240> 6 com.apple.HIToolbox 0x00007fffa7dfdcf1 ReceiveNextEventCommon + 432> 7 com.apple.HIToolbox 0x00007fffa7dfdb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71> 8 com.apple.AppKit 0x00007fffa6396a54 _DPSNextEvent + 1120> 9 com.apple.AppKit 0x00007fffa6b127ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796> 10 com.apple.AppKit 0x00007fffa66f568d +[NSWindow(NSWindowResizing) _mouseHysteresisCheck:withExpiration:andDistance:finalMouseLocation:] + 525> 11 com.apple.AppKit 0x00007fffa65eedb5 -[NSWindow(NSWindowResizing) _hitTestWithHysteresisCheck:forEvent:allowWindowDragging:] + 394> 12 com.apple.AppKit 0x00007fffa6c8f0db -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 1873> 13 com.apple.AppKit 0x00007fffa6c8ca6c -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 1942> 14 com.apple.AppKit 0x00007fffa6c8bf0a -[NSWindow(NSEventRouting) sendEvent:] + 541> 15 org.libsdl.SDL2 0x000000010d46d74a -[SDLWindow sendEvent:] + 90> 16 com.apple.AppKit 0x00007fffa6b10681 -[NSApplication(NSEvent) sendEvent:] + 1145> 17 org.libsdl.SDL2 0x000000010d46532b -[SDLApplication sendEvent:] + 139> 18 org.libsdl.SDL2 0x000000010d466b2f Cocoa_PumpEvents + 495> 19 org.libsdl.SDL2 0x000000010d44c1d5 SDL_PumpEvents_REAL + 53> 20 org.libsdl.SDL2 0x000000010d44c2f5 SDL_WaitEventTimeout_REAL + 53> 21 org.libsdl.SDL2 0x000000010d44c2b7 SDL_PollEvent_REAL + 23> 22 org.libsdl.SDL2 0x000000010d51bb24 SDL_PollEvent + 36> 23 libTest.dylib 0x000000010cf3e0e8 SDLEventProcessor::processEvents(int) + 568> 24 Test 0x000000010cde6bba BrowserApp::RunAppMessageLoop(BAInstData*, CefStringBase, CefStringBase) + 810> 25 Test 0x000000010ce04bbc main + 17980> 26 libdyld.dylib 0x00007fffbe016235 start + 1> ```> > I further noticed that while entering full screen in SDL_cocoawindow.m NSResizableWindowMask is set. If I clear it inside windowDidEnterFullScreen, then, the issue doesn't repro.> > > This is discussed at https://discourse.libsdl.org/t/main-thread-gets-stuck-on-left-mouse-down/22753/3 and thanks to Eric for the pointers.On 2017-07-07 07:23:01 +0000, Amruth Raj wrote:> I am increasing the priority since it is a very common use case and it easily repros. Once reproduced, it makes the application stop rendering anything on screen.On 2017-07-07 09:40:28 +0000, Amruth Raj wrote:> Here is my patch where I verified the issue no longer occurs:>> ```diff> diff -r 9dda3f3e9794 src/video/cocoa/SDL_cocoawindow.m> --- a/src/video/cocoa/SDL_cocoawindow.m Wed Jul 05 12:04:37 2017 -0400> +++ b/src/video/cocoa/SDL_cocoawindow.m Fri Jul 07 15:08:16 2017 +0530> @@ -674,6 +674,7 @@> pendingWindowOperation = PENDING_OPERATION_NONE;> [self setFullscreenSpace:NO];> } else {> + SetWindowStyle(window, 0);> if ((window->flags & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {> [NSMenu setMenuBarVisible:NO];> }> ```On 2017-07-08 15:53:24 +0000, Amruth Raj wrote:> Created attachment 2793> FixOn 2017-07-11 00:07:37 +0000, Sam Lantinga wrote:> Fixed, thanks!> https://hg.libsdl.org/SDL/rev/81e6d0f852fcOn 2017-07-27 19:56:53 +0000, Eric Wasylishen wrote:> (In reply to Sam Lantinga from comment # 4)> > Fixed, thanks!> > https://hg.libsdl.org/SDL/rev/81e6d0f852fc> > Unfortunately this commit seems to have broken exiting desktop-fullscreen.> - Launch testgl2.> - Press alt+enter to go fullscreen-desktop> - Press alt+enter again. The spinning cube will freeze, and the window stays fullscreen desktop.On 2017-07-28 10:45:25 +0000, Amruth Raj wrote:> Problem is that the main thread gets stuck in Cocoa_SetWindowFullscreenSpace for 30 seconds while coming out of full screen.> This is happening because NSWindowWillExitFullScreenNotification fails to come after resizable: false flag is set.> > I tried explicitly setting this flag before doing toggleFullscreen and a few other places, but that didn't help. I am unsure why the WillExit notification itself cannot come.On 2017-08-02 03:09:25 +0000, Eric Wasylishen wrote:> Created attachment 2815> Fix exiting fullscreen desktop> > I think I found a better fix.> > The problem with https://hg.libsdl.org/SDL/rev/81e6d0f852fc 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.On 2017-08-02 03:16:27 +0000, Sam Lantinga wrote:> This is in, thanks!> https://hg.libsdl.org/SDL/rev/6709dc9adb16
I just backed out the fix for this, because it caused a serious problem with tiling fullscreen windows, and it still happens with resizable windows that aren't fullscreen_desktop anyhow.
Have to look into what causes this, because other Mac apps don't seem to have this issue.
I'm going to bump this because this is still a mystery to me and we're out of time. Going to do some more research and testing after 2.26.0 ships and possibly get Apple engineers in the loop.
Tracking upstream SDL issue libsdl-org#2497
This is an attributed tracking copy, not a locally reproduced or confirmed Graphix defect. Applicability, affected versions and ownership still require validation. No automatic synchronization or resolution is implied. Original descriptions and comments are preserved literally in Markdown code blocks to avoid notifying mentioned users or resolving SDL references against Graphix. Attachments, logs, patches and other linked resources remain at their original URLs; external resource contents and edit/event histories are not copied.
Graphix validation checklist
Original description
Original discussion (chronological)
Original comment by icculus
Source: libsdl-org#2497 (comment)
Created: 2022-08-09T00:37:53.0000000Z; updated: 2022-08-09T00:37:53.0000000Z; association: COLLABORATOR
Original comment by icculus
Source: libsdl-org#2497 (comment)
Created: 2022-11-16T18:05:06.0000000Z; updated: 2022-11-16T18:05:06.0000000Z; association: COLLABORATOR
Original comment by icculus
Source: libsdl-org#2497 (comment)
Created: 2023-03-07T00:49:28.0000000Z; updated: 2023-03-07T00:49:28.0000000Z; association: COLLABORATOR