[gtk/wip/chergert/for-4-6: 4/56] macos: restore unfullscreen frame with style mask
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/for-4-6: 4/56] macos: restore unfullscreen frame with style mask
- Date: Wed, 16 Mar 2022 19:25:44 +0000 (UTC)
commit bad392eb2adfd21f93285f6609d1e0445c9f1839
Author: Christian Hergert <christian hergert me>
Date: Thu Feb 24 22:31:42 2022 -0800
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.
gdk/macos/GdkMacosWindow.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c
index f879decbc9..3ed60cb049 100644
--- a/gdk/macos/GdkMacosWindow.c
+++ b/gdk/macos/GdkMacosWindow.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]