macos: fix origin during live resize of titled window
authorChristian Hergert <christian@hergert.me>
Fri, 25 Feb 2022 07:27:09 +0000 (23:27 -0800)
committerChristian Hergert <chergert@redhat.com>
Wed, 16 Mar 2022 19:23:04 +0000 (12:23 -0700)
When using server-side-decorations, we need to avoid potential cycles with
compute-size as it may not have the new sizing information yet. We can
just short circuit during "live resize" to get that effect.

Fixes poor window resizing from top-left on titled windows.

gdk/macos/gdkmacostoplevelsurface.c

index 27289787ca1cabae7312dd9e0efc542028a646cd..c84ebb704bd328d3df43d045f44c1d87ae9f112e 100644 (file)
@@ -421,7 +421,8 @@ _gdk_macos_toplevel_surface_compute_size (GdkSurface *surface)
                         GDK_TOPLEVEL_STATE_RIGHT_TILED |
                         GDK_TOPLEVEL_STATE_BOTTOM_TILED |
                         GDK_TOPLEVEL_STATE_LEFT_TILED |
-                        GDK_TOPLEVEL_STATE_MINIMIZED))
+                        GDK_TOPLEVEL_STATE_MINIMIZED) ||
+      [macos_surface->window inLiveResize])
     return FALSE;
 
   /* If we delayed a user resize until the beginning of the frame,