mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
wayland: Fix the popover race workaround
The Wayland backend has a hack to work around a race with popover mapping: If the surface size changes before the initial configure, we hide and show the surface. Unfortunately, the code was doing this in a way that is externally observable (by listening for surface state changes), and popovers were observing it and hiding themselves in response. Avoid this by not going through the GDK frontend code for this.
This commit is contained in:
parent
c16f10abea
commit
ed9b874d2e
@ -696,6 +696,10 @@ is_realized_popup (GdkSurface *surface)
|
||||
impl->display_server.zxdg_popup_v6);
|
||||
}
|
||||
|
||||
static void gdk_wayland_surface_show (GdkSurface *surface,
|
||||
gboolean already_mapped);
|
||||
static void gdk_wayland_surface_hide (GdkSurface *surface);
|
||||
|
||||
static void
|
||||
gdk_wayland_surface_maybe_configure (GdkSurface *surface,
|
||||
int width,
|
||||
@ -721,12 +725,12 @@ gdk_wayland_surface_maybe_configure (GdkSurface *surface,
|
||||
is_visible = gdk_surface_is_visible (surface);
|
||||
|
||||
if (is_xdg_popup && is_visible && !impl->initial_configure_received)
|
||||
gdk_surface_hide (surface);
|
||||
gdk_wayland_surface_hide (surface);
|
||||
|
||||
gdk_wayland_surface_configure (surface, width, height, scale);
|
||||
|
||||
if (is_xdg_popup && is_visible && !impl->initial_configure_received)
|
||||
gdk_surface_show (surface);
|
||||
gdk_wayland_surface_show (surface, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user