[mutter/wayland] xwayland: Make sure to clear an existing surface if we have one



commit 9df8e831bea7662db1ecff4fdb45354e114ba3c8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Mar 11 10:23:35 2014 -0400

    xwayland: Make sure to clear an existing surface if we have one
    
    This fixes an assert fail when redecorating an X11 client.

 src/wayland/meta-xwayland.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index f65ac56..ae8509e 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]