mirror of https://github.com/libsdl-org/SDL.git
cocoa: Fix zoom check when leaving fullscreen
Non-resizable windows will always report as zoomed, so isZoomed is not a reliable check here.
This commit is contained in:
parent
03cdd297e0
commit
79081a178f
|
|
@ -1504,9 +1504,10 @@ static NSCursor *Cocoa_GetDesiredCursor(void)
|
||||||
if ([self windowOperationIsPending:PENDING_OPERATION_ZOOM]) {
|
if ([self windowOperationIsPending:PENDING_OPERATION_ZOOM]) {
|
||||||
[self clearPendingWindowOperation:PENDING_OPERATION_ZOOM];
|
[self clearPendingWindowOperation:PENDING_OPERATION_ZOOM];
|
||||||
[nswindow zoom:nil];
|
[nswindow zoom:nil];
|
||||||
|
_data.was_zoomed = !_data.was_zoomed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![nswindow isZoomed]) {
|
if (!_data.was_zoomed) {
|
||||||
// Apply a pending window size, if not zoomed.
|
// Apply a pending window size, if not zoomed.
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
rect.origin.x = _data.pending_position ? window->pending.x : window->floating.x;
|
rect.origin.x = _data.pending_position ? window->pending.x : window->floating.x;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue