[Xfce4-commits] [xfce/xfwm4] 02/05: Small optimization in unmap notify event handler

noreply at xfce.org noreply at xfce.org
Thu Jan 29 22:19:50 CET 2015


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

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 5817462e97008eab556f80b2b68be7e545e9382f
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Thu Jan 29 21:26:53 2015 +0100

    Small optimization in unmap notify event handler
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/events.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/events.c b/src/events.c
index dfa6c70..2ecb1b8 100644
--- a/src/events.c
+++ b/src/events.c
@@ -1230,19 +1230,19 @@ handleUnmapNotify (DisplayInfo *display_info, XUnmapEvent * ev)
         return status;
     }
 
-    screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
-    if (screen_info && (ev->event != ev->window) && (ev->event != screen_info->xroot || !ev->send_event))
-    {
-        TRACE ("handleUnmapNotify (): Event ignored");
-        return status;
-    }
-
     c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
     if (c)
     {
         TRACE ("UnmapNotify for \"%s\" (0x%lx)", c->name, c->window);
         TRACE ("ignore_unmap for \"%s\" is %i", c->name, c->ignore_unmap);
 
+        screen_info = c->screen_info;
+        if ((ev->event != ev->window) && (ev->event != screen_info->xroot || !ev->send_event))
+        {
+            TRACE ("handleUnmapNotify (): Event ignored");
+            return status;
+        }
+
         status = EVENT_FILTER_REMOVE;
         if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MAP_PENDING))
         {
@@ -1255,8 +1255,6 @@ handleUnmapNotify (DisplayInfo *display_info, XUnmapEvent * ev)
             return status;
         }
 
-        screen_info = c->screen_info;
-
         /*
          * ICCCM spec states that a client wishing to switch
          * to WithdrawnState should send a synthetic UnmapNotify

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


More information about the Xfce4-commits mailing list