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:
		@ -1075,6 +1075,17 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (impl->surface)
 | 
					  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)
 | 
					      if (!is_destroy)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          wl_surface_attach (impl->surface, NULL, 0, 0);
 | 
					          wl_surface_attach (impl->surface, NULL, 0, 0);
 | 
				
			||||||
@ -1088,17 +1099,6 @@ gdk_wayland_window_hide_surface (GdkWindow *window,
 | 
				
			|||||||
          g_slist_free (impl->outputs);
 | 
					          g_slist_free (impl->outputs);
 | 
				
			||||||
          impl->outputs = NULL;
 | 
					          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;
 | 
					  impl->mapped = FALSE;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user