cocoa: Properly set the pending fullscreen spaces state when in a transition

(cherry picked from commit b520cde18f)
This commit is contained in:
Frank Praznik committed 2025-03-24 23:26:00 -04:00
1 parent 996466e855
commit 013918cd83
1 file changed
+3 -1
+3 -1
View File
@@ -868,14 +868,16 @@ static NSCursor *Cocoa_GetDesiredCursor(void)
return NO; // we only allow you to make a Space on fullscreen desktop windows.
} else if (!state && window->last_fullscreen_exclusive_display) {
return NO; // we only handle leaving the Space on windows that were previously fullscreen desktop.
} else if (state == isFullscreenSpace) {
} else if (state == isFullscreenSpace && !inFullscreenTransition) {
return YES; // already there.
}
if (inFullscreenTransition) {
if (state) {
[self clearPendingWindowOperation:PENDING_OPERATION_LEAVE_FULLSCREEN];
[self addPendingWindowOperation:PENDING_OPERATION_ENTER_FULLSCREEN];
} else {
[self clearPendingWindowOperation:PENDING_OPERATION_ENTER_FULLSCREEN];
[self addPendingWindowOperation:PENDING_OPERATION_LEAVE_FULLSCREEN];
}
return YES;