[gtk/wip/chergert/for-main] macos: remove x/y wm placement with transient-for



commit 69cfac04549d77457417e06c29f23f0c5e0de41f
Author: Christian Hergert <christian hergert me>
Date:   Mon Feb 28 23:34:35 2022 -0800

    macos: remove x/y wm placement with transient-for
    
    We don't need to respect the x,y here for initial placement with toplevels.
    We can always place them on top of the parent within reason as handled in
    the other cases.
    
    Otherwise, we risk getting a configure event in when creating the window
    and never hitting the initial placement path.

 gdk/macos/gdkmacosdisplay-wm.c | 7 -------
 1 file changed, 7 deletions(-)
---
diff --git a/gdk/macos/gdkmacosdisplay-wm.c b/gdk/macos/gdkmacosdisplay-wm.c
index 244d9694ed..4f0672013c 100644
--- a/gdk/macos/gdkmacosdisplay-wm.c
+++ b/gdk/macos/gdkmacosdisplay-wm.c
@@ -42,13 +42,6 @@ _gdk_macos_display_position_toplevel_with_parent (GdkMacosDisplay *self,
   g_assert (GDK_IS_MACOS_TOPLEVEL_SURFACE (surface));
   g_assert (GDK_IS_MACOS_TOPLEVEL_SURFACE (parent));
 
-  /* If x/y is set, we should place relative to parent */
-  if (GDK_SURFACE (surface)->x != 0 || GDK_SURFACE (surface)->y != 0)
-    {
-      *x = parent->root_x + GDK_SURFACE (surface)->x;
-      *y = parent->root_y + GDK_SURFACE (surface)->y;
-      return;
-    }
   monitor = _gdk_macos_surface_get_best_monitor (parent);
 
   /* Try to center on top of the parent but also try to make the whole thing


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]