From ec6999012627e5176e55f7bb13a6f0ba6298a3d0 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 13 Apr 2023 02:44:05 +0200 Subject: [PATCH] wayland: Remove an old workaround This workaround - were it ever to trigger - is broken today. It destroys the wl_surface and all associated structs but does not recreate the xdg_popup or xdg_toplevel struct, so it would cause a hidden window. The workaround looked a lot different when it was introduced in commit 83b54bab5734f17d01633c1b5a0ce3e4896d2ee0, too - both in what it did and in what the vfuncs did that it called. --- gdk/wayland/gdksurface-wayland.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 0cebc00474..523e0eef2e 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -205,29 +205,13 @@ gdk_wayland_surface_maybe_resize (GdkSurface *surface, const GdkFractionalScale *scale) { GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface); - gboolean hide_temporarily; if (surface->width == width && surface->height == height && gdk_fractional_scale_equal (&impl->scale, scale)) return; - /* For xdg_popup using an xdg_positioner, there is a race condition if - * the application tries to change the size after it's mapped, but before - * the initial configure is received, so hide and show the surface again - * force the new size onto the compositor. See bug #772505. - */ - hide_temporarily = GDK_IS_WAYLAND_POPUP (surface) && - gdk_surface_get_mapped (surface) && - !impl->initial_configure_received; - - if (hide_temporarily) - gdk_surface_hide (surface); - gdk_wayland_surface_update_size (surface, width, height, scale); - - if (hide_temporarily) - gdk_wayland_surface_create_wl_surface (surface); } static inline void -- 2.30.2