macos: fix redisplay of GdkPopup
authorChristian Hergert <christian@hergert.me>
Mon, 28 Feb 2022 10:10:30 +0000 (02:10 -0800)
committerChristian Hergert <christian@hergert.me>
Mon, 28 Feb 2022 19:36:27 +0000 (11:36 -0800)
This broke recently during the configure cleanups and also needed to have
the tail directions fixed again.

gdk/macos/gdkmacospopupsurface.c
gdk/macos/gdkmacossurface.c

index 477961503f63f3f4bb7ce6c38a7b0df81b40521d..5a2d7ed48146bdcaa539b023958b062963a11681 100644 (file)
@@ -87,6 +87,9 @@ gdk_macos_popup_surface_layout (GdkMacosPopupSurface *self,
 
   gdk_surface_get_origin (GDK_SURFACE (self)->parent, &x, &y);
 
+  GDK_SURFACE (self)->x = final_rect.x;
+  GDK_SURFACE (self)->y = final_rect.y;
+
   x += final_rect.x;
   y += final_rect.y;
 
@@ -391,9 +394,7 @@ _gdk_macos_popup_surface_reposition (GdkMacosPopupSurface *self)
 {
   g_return_if_fail (GDK_IS_MACOS_POPUP_SURFACE (self));
 
-  if (self->layout == NULL ||
-      !gdk_surface_get_mapped (GDK_SURFACE (self)) ||
-      GDK_SURFACE (self)->parent == NULL)
+  if (self->layout == NULL || GDK_SURFACE (self)->parent == NULL)
     return;
 
   gdk_macos_popup_surface_layout (self,
index 6eb23f2807f666e61524cc0b3774d03f1e4e72c4..af14681890a2e940b2799f6701e371fb98c6e695 100644 (file)
@@ -908,6 +908,7 @@ _gdk_macos_surface_show (GdkMacosSurface *self)
   if (!was_mapped)
     {
       gdk_surface_set_is_mapped (GDK_SURFACE (self), TRUE);
+      gdk_surface_request_layout (GDK_SURFACE (self));
       gdk_surface_thaw_updates (GDK_SURFACE (self));
     }
 }