wayland: Remove an old workaround
authorBenjamin Otte <otte@redhat.com>
Thu, 13 Apr 2023 00:44:05 +0000 (02:44 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 13 Apr 2023 00:44:05 +0000 (02:44 +0200)
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

index 0cebc0047447e606167f6b0af96e3aedeba573e0..523e0eef2e41b3f7e17f952433ed7f087cc428e7 100644 (file)
@@ -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