Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        desktops.c 


Log Message:
Fix MouseUp deskbinding.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -3 -r1.161 -r1.162
--- desktops.c  4 Aug 2005 22:05:29 -0000       1.161
+++ desktops.c  7 Aug 2005 10:41:43 -0000       1.162
@@ -1378,34 +1378,46 @@
      }
 }
 
-static void
-DesktopEventButtonPress(Desk * d __UNUSED__, XEvent * ev)
+static int
+DesktopCheckAction(Desk * d __UNUSED__, XEvent * ev)
 {
    ActionClass        *ac;
 
+   ac = FindItem("DESKBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS);
+   if (!ac)
+      return 0;
+
+   return ActionclassEvent(ac, ev, NULL);
+}
+
+static void
+DesktopEventButtonPress(Desk * d, XEvent * ev)
+{
    /* Don't handle desk bindings while doing stuff */
    if (Mode.mode)
       return;
 
    GrabPointerRelease();
 
-   ac = FindItem("DESKBINDINGS", 0, LIST_FINDBY_NAME, LIST_TYPE_ACLASS);
-   if (ac)
-     {
-       if (!ActionclassEvent(ac, ev, NULL))
-          ButtonProxySendEvent(ev);
-     }
+   if (!DesktopCheckAction(d, ev))
+      ButtonProxySendEvent(ev);
 }
 
 static void
-DesktopEventButtonRelease(Desk * d __UNUSED__, XEvent * ev)
+DesktopEventButtonRelease(Desk * d, XEvent * ev)
 {
+   /* Don't handle desk bindings while doing stuff */
+   if (Mode.mode)
+      return;
+
    if (sentpress)
      {
        /* We never get here? */
        sentpress = 0;
        ButtonProxySendEvent(ev);
      }
+
+   DesktopCheckAction(d, ev);
 }
 
 static void




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to