mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
macos: restore unfullscreen frame with style mask
This doesn't give us appropriate results if we use the window delegate. Instead, we need to adjust the frame at the same time we change the style mask so that we end up in the same location.
This commit is contained in:
parent
617deb8bb6
commit
56e2a7e8bb
@ -668,7 +668,12 @@ typedef NSString *CALayerContentsGravity;
|
||||
is_opaque = (([self styleMask] & NSWindowStyleMaskTitled) != 0);
|
||||
|
||||
if (was_fullscreen != is_fullscreen)
|
||||
_gdk_macos_surface_update_fullscreen_state (gdk_surface);
|
||||
{
|
||||
if (was_fullscreen)
|
||||
[self setFrame:lastUnfullscreenFrame display:NO];
|
||||
|
||||
_gdk_macos_surface_update_fullscreen_state (gdk_surface);
|
||||
}
|
||||
|
||||
if (was_opaque != is_opaque)
|
||||
{
|
||||
@ -753,7 +758,6 @@ typedef NSString *CALayerContentsGravity;
|
||||
|
||||
-(void)windowWillExitFullScreen:(NSNotification *)aNotification
|
||||
{
|
||||
[self setFrame:lastUnfullscreenFrame display:NO];
|
||||
}
|
||||
|
||||
-(void)windowDidExitFullScreen:(NSNotification *)aNotification
|
||||
|
Loading…
Reference in New Issue
Block a user