[gtk/wip/chergert/for-main] macos: fix redisplay of GdkPopup
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/for-main] macos: fix redisplay of GdkPopup
- Date: Mon, 28 Feb 2022 10:10:56 +0000 (UTC)
commit 1a1075b7cb5ba33f8146b1def9f87a18805a725a
Author: Christian Hergert <christian hergert me>
Date: Mon Feb 28 02:10:30 2022 -0800
macos: fix redisplay of GdkPopup
This broke recently during the configure cleanups and also needed to have
the tail directions fixed again.
gdk/macos/gdkmacospopupsurface.c | 7 ++++---
gdk/macos/gdkmacossurface.c | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gdk/macos/gdkmacospopupsurface.c b/gdk/macos/gdkmacospopupsurface.c
index 477961503f..5a2d7ed481 100644
--- a/gdk/macos/gdkmacospopupsurface.c
+++ b/gdk/macos/gdkmacospopupsurface.c
@@ -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,
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index ac2353dd03..e92ba905fc 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -882,6 +882,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));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]