diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-02-25 15:50:15 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-02-25 15:50:15 +0000 |
commit | fc47b913b10bc985d68c20331a4033299d312d25 (patch) | |
tree | 8dfb0cc345af89b55373496aa1da23da5a465584 | |
parent | 7d8b3357a5ad94232b98c580a75f14c532c1c17b (diff) | |
parent | 36bdcfaccb6de70a753e63d502a9654315d6ec47 (diff) | |
download | gtk+-fc47b913b10bc985d68c20331a4033299d312d25.tar.gz |
Merge branch 'wip/chergert/macos-fix-popover-tails' into 'main'
macos: fix positioning of popover tails
See merge request GNOME/gtk!4515
-rw-r--r-- | gdk/macos/gdkmacossurface.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c index 0f9fd4d833..5998c4162f 100644 --- a/gdk/macos/gdkmacossurface.c +++ b/gdk/macos/gdkmacossurface.c @@ -69,10 +69,8 @@ _gdk_macos_surface_reposition_children (GdkMacosSurface *self) { g_assert (GDK_IS_MACOS_SURFACE (self)); - if (GDK_SURFACE_DESTROYED (self)) - return; - if (!gdk_surface_get_mapped (GDK_SURFACE (self))) + if (GDK_SURFACE_DESTROYED (self)) return; for (const GList *iter = GDK_SURFACE (self)->children; @@ -767,18 +765,15 @@ _gdk_macos_surface_configure (GdkMacosSurface *self) content_rect.origin.y + content_rect.size.height, &self->root_x, &self->root_y); - if (self->did_initial_present) + if (surface->parent != NULL) { - if (surface->parent != NULL) - { - surface->x = self->root_x - GDK_MACOS_SURFACE (surface->parent)->root_x; - surface->y = self->root_y - GDK_MACOS_SURFACE (surface->parent)->root_y; - } - else - { - surface->x = self->root_x; - surface->y = self->root_y; - } + surface->x = self->root_x - GDK_MACOS_SURFACE (surface->parent)->root_x; + surface->y = self->root_y - GDK_MACOS_SURFACE (surface->parent)->root_y; + } + else + { + surface->x = self->root_x; + surface->y = self->root_y; } if (surface->width != content_rect.size.width || |