Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ewins.c focus.c 


Log Message:
Focus window on activated button binding with click-to-focus.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/ewins.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- ewins.c     8 Jul 2005 16:48:06 -0000       1.81
+++ ewins.c     9 Jul 2005 15:42:04 -0000       1.82
@@ -1709,9 +1709,14 @@
       return 0;
 
    if (ev->type == ButtonPress)
-      GrabPointerSet(EoGetWin(ewin), ECSR_GRAB, 0);
+     {
+       GrabPointerSet(EoGetWin(ewin), ECSR_GRAB, 0);
+       FocusToEWin(ewin, FOCUS_CLICK);
+     }
    else if (ev->type == ButtonRelease)
-      GrabPointerRelease();
+     {
+       GrabPointerRelease();
+     }
 
    return ActionclassEvent(ac, ev, ewin);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -3 -r1.106 -r1.107
--- focus.c     8 Jul 2005 16:48:06 -0000       1.106
+++ focus.c     9 Jul 2005 15:42:04 -0000       1.107
@@ -420,9 +420,16 @@
    switch (why)
      {
      case FOCUS_EWIN_NEW:
+       if (!FocusEwinValid(ewin, 1, 0, 0))
+          break;
        focus_pending_new = ewin;
-       /* Fall-thru */
+       focus_pending_why = why;
+       focus_pending_ewin = ewin;
+       break;
+
      default:
+       if (!FocusEwinValid(ewin, 1, why == FOCUS_CLICK, 0))
+          break;
        focus_pending_why = why;
        focus_pending_ewin = ewin;
        break;




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to