From: Christian Hergert Date: Fri, 11 Mar 2022 07:16:38 +0000 (-0800) Subject: macos: request layout with server-side decoration X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~3^2~7^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d62313e75ce528cadbea00b148e35d7e62dfef61;p=gtk4.git macos: request layout with server-side decoration If we have server-side decorations we might need to request a layout in response to the resize notification. We don't need to do this in other cases because we already handle that in the process of doing the resize (and that code is that way because of delayed delivery of NSNotification). --- diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c index 7aee71f630..c93be7f49e 100644 --- a/gdk/macos/GdkMacosWindow.c +++ b/gdk/macos/GdkMacosWindow.c @@ -379,8 +379,15 @@ typedef NSString *CALayerContentsGravity; -(void)windowDidResize:(NSNotification *)notification { - _gdk_macos_surface_configure ([self gdkSurface]); - gdk_surface_request_layout (GDK_SURFACE (gdk_surface)); + _gdk_macos_surface_configure (gdk_surface); + + /* If we're using server-side decorations, this notification is coming + * in from a display-side change. We need to request a layout in + * addition to the configure event. + */ + if (GDK_IS_MACOS_TOPLEVEL_SURFACE (gdk_surface) && + GDK_MACOS_TOPLEVEL_SURFACE (gdk_surface)->decorated) + gdk_surface_request_layout (GDK_SURFACE (gdk_surface)); } /* Used by gdkmacosdisplay-translate.c to decide if our sendEvent() handler