mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
xwayland: Make sure to clear an existing surface if we have one
This fixes an assert fail when redecorating an X11 client.
This commit is contained in:
parent
84c6b2a3fa
commit
9df8e831be
@ -47,6 +47,13 @@ xserver_set_window_id (struct wl_client *client,
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
/* If the window has an existing surface, like if we're
|
||||
* undecorating or decorating the window, then we need
|
||||
* to detach the window from its old surface.
|
||||
*/
|
||||
if (window->surface)
|
||||
window->surface->window = NULL;
|
||||
|
||||
meta_wayland_surface_make_toplevel (surface);
|
||||
|
||||
surface->window = window;
|
||||
|
Loading…
Reference in New Issue
Block a user