Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        actions.c borders.c focus.c 


Log Message:
Plugged very annoying grab leak, fixed click-to-focus.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -3 -r1.140 -r1.141
--- actions.c   13 Feb 2004 18:36:51 -0000      1.140
+++ actions.c   16 Feb 2004 22:58:18 -0000      1.141
@@ -113,10 +113,12 @@
                  mask = ButtonPressMask | ButtonReleaseMask;
                  if (mod == AnyModifier)
                    {
+#if 0                          /* Why? */
                       if (pager_hi_win)
                          XGrabButton(disp, button, mod, pager_hi_win,
                                      False, mask, GrabModeSync, GrabModeAsync,
                                      None, None);
+#endif
                       XGrabButton(disp, button, mod, ewin->win, False, mask,
                                   GrabModeSync, GrabModeAsync, None, None);
                    }
@@ -126,12 +128,14 @@
 
                       for (i = 0; i < 8; i++)
                         {
+#if 0                          /* Why? */
                            if (pager_hi_win)
                               XGrabButton(disp, button,
                                           mod | mask_mod_combos[i],
                                           pager_hi_win, False, mask,
                                           GrabModeSync, GrabModeAsync, None,
                                           None);
+#endif
                            XGrabButton(disp, button, mod | mask_mod_combos[i],
                                        ewin->win, False, mask, GrabModeSync,
                                        GrabModeAsync, None, None);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/borders.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -3 -r1.132 -r1.133
--- borders.c   8 Feb 2004 22:51:50 -0000       1.132
+++ borders.c   16 Feb 2004 22:58:19 -0000      1.133
@@ -1328,6 +1328,7 @@
    XChangeWindowAttributes(disp, ewin->win, CWEventMask | CWDontPropagate,
                           &att);
    FocusEwinSetGrabs(ewin);
+   GrabButtonGrabs(ewin);
    EDBUG_RETURN(ewin);
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/focus.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- focus.c     8 Feb 2004 22:51:50 -0000       1.47
+++ focus.c     16 Feb 2004 22:58:21 -0000      1.48
@@ -117,7 +117,9 @@
 void
 FocusEwinSetGrabs(EWin * ewin)
 {
-   if (conf.focus.clickraises || conf.focus.mode == MODE_FOCUS_CLICK)
+   if ((conf.focus.mode != MODE_FOCUS_CLICK &&
+       ewin->active && conf.focus.clickraises) ||
+       (conf.focus.mode == MODE_FOCUS_CLICK && !ewin->active))
      {
        XGrabButton(disp, AnyButton, AnyModifier, ewin->win_container,
                    False, ButtonPressMask, GrabModeSync, GrabModeAsync,
@@ -127,7 +129,6 @@
      {
        XUngrabButton(disp, AnyButton, AnyModifier, ewin->win_container);
      }
-   GrabButtonGrabs(ewin);
 }
 
 void
@@ -146,6 +147,7 @@
    for (i = 0; i < num; i++)
      {
        ewin = lst[i];
+       XUngrabButton(disp, AnyButton, AnyModifier, ewin->win_container);
        FocusEwinSetGrabs(ewin);
      }
    Efree(lst);
@@ -480,8 +482,10 @@
 {
    Window              win = ev->xcrossing.window;
 
-   /* Leaving root means entering other screen */
-   if (win == root.win)
+   /* Leaving root may mean entering other screen */
+   if (win == root.win &&
+       (ev->xcrossing.mode == NotifyNormal &&
+       ev->xcrossing.detail != NotifyInferior))
       FocusToEWin(NULL, FOCUS_SET);
 }
 




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to