[Xfce4-commits] [xfce/xfwm4] 01/03: cycling: Remove client if destroyed while cycling

noreply at xfce.org noreply at xfce.org
Wed Apr 24 21:51:11 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 61e3055874184a5590fe7070faf0032e5a25b2c8
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Tue Apr 23 21:27:39 2019 +0200

    cycling: Remove client if destroyed while cycling
    
    Bug: 15318
    
    Fix a regression where the client would remain visible if closed while
    cycling.
    
    Fixes: ef33ff7 "Replace XEvent with XfwmEvent + add xfwm_device..."
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/cycle.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/cycle.c b/src/cycle.c
index 164024d..5b092f5 100644
--- a/src/cycle.c
+++ b/src/cycle.c
@@ -251,7 +251,7 @@ clientCycleEventFilter (XfwmEvent *event, gpointer data)
     eventFilterStatus status;
     KeyCode cancel, left, right, up, down;
     int key, modifiers;
-    gboolean cycling, gone;
+    gboolean cycling;
     GList *li;
 
     TRACE ("entering");
@@ -275,7 +275,6 @@ clientCycleEventFilter (XfwmEvent *event, gpointer data)
     status = EVENT_FILTER_CONTINUE;
     removed = NULL;
     cycling = TRUE;
-    gone = FALSE;
 
     /* Update the display time */
     myDisplayUpdateCurrentTime (display_info, event);
@@ -400,18 +399,28 @@ clientCycleEventFilter (XfwmEvent *event, gpointer data)
             {
                 case DestroyNotify:
                     status = EVENT_FILTER_CONTINUE;
-                    if ((removed = myScreenGetClientFromWindow (screen_info, ((XDestroyWindowEvent *) event->meta.x)->window, SEARCH_WINDOW)) == NULL)
+                    removed = myScreenGetClientFromWindow (screen_info,
+                                                           ((XDestroyWindowEvent *) event->meta.x)->window,
+                                                           SEARCH_WINDOW);
+                    if (removed == NULL)
+                    {
                         break; /* No need to go any further */
-                    gone |= (c == removed);
+                    }
                     FALLTHROUGH;
                 case UnmapNotify:
                     status = EVENT_FILTER_CONTINUE;
-                    if (!removed && (removed = myScreenGetClientFromWindow (screen_info, ((XUnmapEvent *) event->meta.x)->window, SEARCH_WINDOW)) == NULL)
-                        break; /* No need to go any further */
-                    gone |= (c == removed);
+                    if (!removed)
+                    {
+                        removed = myScreenGetClientFromWindow (screen_info,
+                                                               ((XUnmapEvent *) event->meta.x)->window,
+                                                               SEARCH_WINDOW);
+                        if (removed == NULL)
+                        {
+                            break; /* No need to go any further */
+                        }
+                    }
                     c = tabwinRemoveClient(passdata->tabwin, removed);
                     cycling = clientCycleUpdateWireframe (c, passdata);
-                    status = EVENT_FILTER_STOP;
                     break;
             }
             break;

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


More information about the Xfce4-commits mailing list