[Xfce4-commits] [xfce/xfwm4] 03/03: compositor: Ignore errors when destroying windows

noreply at xfce.org noreply at xfce.org
Sun May 5 15:42:28 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 fe9e0f26f96613355f46004838002857afbe5533
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Sun May 5 15:40:05 2019 +0200

    compositor: Ignore errors when destroying windows
    
    The window and its resources may be gone already on the Xserver side, in
    which case we might generate XErrors. Ignore those to keep on the safe
    side.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 7e07643..de15816 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -819,6 +819,7 @@ free_win_data (CWindow *cw, gboolean delete)
 
     if (delete)
     {
+        myDisplayErrorTrapPush (display_info);
         if (cw->picture)
         {
             XRenderFreePicture (display_info->dpy, cw->picture);
@@ -833,17 +834,10 @@ free_win_data (CWindow *cw, gboolean delete)
 
         if (cw->damage)
         {
-            /* The damage may be already destroyed along with the attached resource,
-             * (see http://lists.x.org/archives/xorg-devel/2011-March/020831.html)
-             * so there is a high probability that the following will generate an
-             * X error eventually, but there's no way to be sure so just destroy
-             * the damage and ignore the error.
-             */
-            myDisplayErrorTrapPush (display_info);
             XDamageDestroy (display_info->dpy, cw->damage);
-            myDisplayErrorTrapPopIgnored (display_info);
             cw->damage = None;
         }
+        myDisplayErrorTrapPopIgnored (display_info);
 
         g_free (cw);
     }

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


More information about the Xfce4-commits mailing list