[Xfce4-commits] [xfce/xfwm4] 02/02: compositor: Fix XError with window preview

noreply at xfce.org noreply at xfce.org
Mon Apr 15 22:08:36 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   l   i   v   i   e   r       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfwm4.

commit 4700670aa32d6f08a00706fb85a89bee4cf2883d
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon Apr 15 21:55:08 2019 +0200

    compositor: Fix XError with window preview
    
    Bug: 14990
    
    When a window is iconified, the compositor would keep a copy of its
    picture for the window preview in the tabwin.
    
    However, it would still release the picture, and a further XError would
    occur when trying to use it.
---
 src/compositor.c | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 7ade3fe..68eb787 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -769,23 +769,6 @@ free_win_data (CWindow *cw, gboolean delete)
     }
 #endif
 
-    if (cw->picture)
-    {
-        if (delete)
-        {
-            XRenderFreePicture (display_info->dpy, cw->picture);
-        }
-        else
-        {
-            if (cw->saved_picture)
-            {
-                XRenderFreePicture (display_info->dpy, cw->saved_picture);
-            }
-            cw->saved_picture = cw->picture;
-        }
-        cw->picture = None;
-    }
-
     if (cw->shadow)
     {
         XRenderFreePicture (display_info->dpy, cw->shadow);
@@ -836,6 +819,11 @@ free_win_data (CWindow *cw, gboolean delete)
 
     if (delete)
     {
+        if (cw->picture)
+        {
+            XRenderFreePicture (display_info->dpy, cw->picture);
+            cw->picture = None;
+        }
         /* No need to keep this around */
         if (cw->saved_picture)
         {
@@ -859,6 +847,15 @@ free_win_data (CWindow *cw, gboolean delete)
 
         g_free (cw);
     }
+    else
+    {
+        if (cw->saved_picture)
+        {
+            XRenderFreePicture (display_info->dpy, cw->saved_picture);
+        }
+        cw->saved_picture = cw->picture;
+        cw->picture = None;
+    }
 }
 
 static Picture
@@ -3795,7 +3792,6 @@ compositorScaleWindowPixmap (CWindow *cw, guint *width, guint *height)
         return None;
     }
 
-
     render_format = get_window_format (cw);
     if (!render_format)
     {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list