Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        warp.c 


Log Message:
Fix focus list sometimes not being closed.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -3 -r1.80 -r1.81
--- warp.c      26 Sep 2005 17:32:10 -0000      1.80
+++ warp.c      13 Oct 2005 18:34:52 -0000      1.81
@@ -56,7 +56,6 @@
 static unsigned int warpFocusKey = 0;
 static int          warplist_num = 0;
 static WarplistItem *warplist;
-static char         warpFirst = 0;
 
 #define ICON_PAD 2
 
@@ -155,7 +154,6 @@
         */
        GrabKeyboardSet(warpFocusWindow->win);
        GrabPointerSet(warpFocusWindow->win, None, 0);
-       warpFirst = 1;
      }
 
    for (i = 0; i < warplist_num; i++)
@@ -360,22 +358,31 @@
 {
    KeySym              key;
 
+   if (!warpFocusWindow->shown)
+      return;
+
    switch (ev->type)
      {
-#if 0                          /* Not necessary when sampling keycode in 
events.c */
      case KeyPress:
-       if (warpFocusWindow->shown && ev->xany.window == VRoot.win)
-          warpFocusKey = ev->xkey.keycode;
-       break;
-#endif
-     case KeyRelease:
-       if (!warpFocusWindow->shown)
-          break;
-       if (warpFirst)
+       if (ev->xkey.keycode == warpFocusKey)
+          key = XK_Tab;
+       else
+          key = XLookupKeysym(&ev->xkey, 0);
+       switch (key)
          {
-            warpFirst = 0;
+         default:
+            break;
+         case XK_Tab:
+         case XK_Down:
+            WarpFocus(1);
+            break;
+         case XK_Up:
+            WarpFocus(-1);
             break;
          }
+       break;
+
+     case KeyRelease:
        if (ev->xkey.keycode == warpFocusKey)
           key = XK_Tab;
        else
@@ -385,12 +392,12 @@
          default:
             WarpFocusFinish();
             break;
+         case XK_Escape:
+            WarpFocusHide();
+            break;
          case XK_Tab:
          case XK_Down:
-            WarpFocus(1);
-            break;
          case XK_Up:
-            WarpFocus(-1);
             break;
          }
        break;




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to