wayland: Don't destroy the wl_surface on hide()
authorBenjamin Otte <otte@redhat.com>
Thu, 13 Apr 2023 01:33:59 +0000 (03:33 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 13 Apr 2023 02:23:35 +0000 (04:23 +0200)
commit5d3cec5441ca1fa28e5e77c0572e629eded419c9
treeed9ee4fc0e5b41c2c52ac0e3f8b40a231531585e
parent891242920e785f01f758629c7bbd5cf263219476
wayland: Don't destroy the wl_surface on hide()

We want to keep the wl_surface around, because surfaces create their
resources on construct and keep them until destroyed. See the HWND ond
Windows and the XWindow on X11.

This is relevant for graphics resources, where we want to have access
to the VkSurface and eglSurface while the GdkSurface is hidden.
We also want these surfaces to be permanent and not change during the
lifetime of the GdkSurface.

What we can - and must - destroy however are the xdg surfaces, because
those handle visibility on screen.
And we also need to ensure no buffer is attached, so that during the
next creation of the xdg surface we don't get a protocol error.
gdk/wayland/gdkdragsurface-wayland.c
gdk/wayland/gdkpopup-wayland.c
gdk/wayland/gdksurface-wayland-private.h
gdk/wayland/gdksurface-wayland.c
gdk/wayland/gdktoplevel-wayland.c