Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        focus.c 


Log Message:
Fix focus when entering desk where nothing should be focused.
Freeze keyboard while switching area/desk.

===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -3 -r1.138 -r1.139
--- focus.c     7 Jan 2006 07:20:58 -0000       1.138
+++ focus.c     3 Feb 2006 19:08:45 -0000       1.139
@@ -437,8 +437,11 @@
    Mode.focuswin = ewin;
    if (Mode.focuswin)
       FocusEwinSetActive(Mode.focuswin, 1);
-   if (why != FOCUS_DESK_LEAVE)
-      ICCCM_Focus(ewin);
+
+   if (why == FOCUS_DESK_LEAVE)
+      return;
+
+   ICCCM_Focus(ewin);
    focus_is_set = 1;
 }
 
@@ -496,6 +499,10 @@
 void
 FocusNewDeskBegin(void)
 {
+   /* Freeze keyboard */
+   XGrabKeyboard(disp, VRoot.win, False, GrabModeAsync, GrabModeSync,
+                CurrentTime);
+
    focus_pending_new = NULL;
    doFocusToEwin(NULL, FOCUS_DESK_LEAVE);
 }
@@ -507,6 +514,9 @@
    Mode.mouse_over_ewin = GetEwinByCurrentPointer();
 
    doFocusToEwin(NULL, FOCUS_DESK_ENTER);
+
+   /* Unfreeze keyboard */
+   XUngrabKeyboard(disp, CurrentTime);
 }
 
 static void




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to