mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gdkwindow-wayland: Destroy the xdg roles before the wl_surface
Since the xdg roles are a special case of the surface, some compositors like Weston destroy them automatically when the wl_surface is destroyed. Thus, we need to destroy these first.
This commit is contained in:
parent
b35820fa3c
commit
6926c6d9f8
@ -1075,6 +1075,17 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
|
||||
|
||||
if (impl->surface)
|
||||
{
|
||||
if (impl->xdg_surface)
|
||||
{
|
||||
xdg_surface_destroy (impl->xdg_surface);
|
||||
impl->xdg_surface = NULL;
|
||||
}
|
||||
else if (impl->xdg_popup)
|
||||
{
|
||||
xdg_popup_destroy (impl->xdg_popup);
|
||||
impl->xdg_popup = NULL;
|
||||
}
|
||||
|
||||
if (!is_destroy)
|
||||
{
|
||||
wl_surface_attach (impl->surface, NULL, 0, 0);
|
||||
@ -1088,17 +1099,6 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
|
||||
g_slist_free (impl->outputs);
|
||||
impl->outputs = NULL;
|
||||
}
|
||||
|
||||
if (impl->xdg_surface)
|
||||
{
|
||||
xdg_surface_destroy (impl->xdg_surface);
|
||||
impl->xdg_surface = NULL;
|
||||
}
|
||||
else if (impl->xdg_popup)
|
||||
{
|
||||
xdg_popup_destroy (impl->xdg_popup);
|
||||
impl->xdg_popup = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
impl->mapped = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user