[mutter] Unset window pixmaps from MutterShapedWindow before freeing them



commit 0b3327f04d5f6a9b018e0967393e342dee217aeb
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Aug 17 18:38:40 2010 -0400

    Unset window pixmaps from MutterShapedWindow before freeing them
    
    At least with the Mesa/DRI implementation of GLX, calling XFreePixmap()
    on a pixmap before glxDestroyPixmap() on the corresponding GLX pixmap
    causes an X error. To avoid triggering this with the new
    ClutterTexturePixmapX11 code, we need to move our XFreePixmap after
    unsetting the pixmap from the actor.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=627210

 src/compositor/mutter-window.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c
index eb90c9d..3581749 100644
--- a/src/compositor/mutter-window.c
+++ b/src/compositor/mutter-window.c
@@ -1028,10 +1028,10 @@ mutter_window_detach (MutterWindow *self)
   if (!priv->back_pixmap)
     return;
 
-  XFreePixmap (xdisplay, priv->back_pixmap);
   priv->back_pixmap = None;
   clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
                                          None);
+  XFreePixmap (xdisplay, priv->back_pixmap);
 
   mutter_window_queue_create_pixmap (self);
 }



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