On Tue, 9 Aug 2005, Viktor Griph wrote:
I've run into an event race when having the following configuration:

DestroyFunc LowerPager
AddToFunc LowerPager
+ I PointerWindow (FvwmPager) Break
+ I All (FvwmPager) Lower

EdgeCommand North All (FvwmPager) Raise
EdgeCommand West All (FvwmPager) Raise
EdgeLeaveCommand North Function LowerPager
EdgeLeaveCommand West Function LowerPager

The problem is when moving from the north pan frame to the west. While being at the upper left corner the pager will keep raising and lowering all the time. This is due to the pan frame being raised under the pointer, thus creating new EnterNotify and LeaveNotify events.

/Viktor


I've found that throwing away LeaveNotify events with a matching EnterNotify (just as EnterNotify does with LeaveNotify) solves the problem. I don't know if that would break anything else thou.

/Viktor
Index: ChangeLog
===================================================================
RCS file: /home/cvs/fvwm/fvwm/ChangeLog,v
retrieving revision 1.2609
diff -u -r1.2609 ChangeLog
--- ChangeLog   7 Aug 2005 09:48:29 -0000       1.2609
+++ ChangeLog   9 Aug 2005 09:30:28 -0000
@@ -1,3 +1,10 @@
+2005-08-09  Viktor Griph  <[EMAIL PROTECTED]>
+
+       * fvwm/events.c (HandleLeaveNotify): 
+       throws away LeaveNotify events with matching EnterNotify (fixes
+       issue with raisePanFrames generating LeaveNotify + EnterNotify
+       after a Raise command issued by an edge command)
+
 2005-08-07  Dominik Vogt  <[EMAIL PROTECTED]>
 
        * fvwm/menustyle.c (menustyle_copy):
Index: fvwm/events.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/fvwm/events.c,v
retrieving revision 1.515
diff -u -r1.515 events.c
--- fvwm/events.c       7 Aug 2005 09:39:56 -0000       1.515
+++ fvwm/events.c       9 Aug 2005 09:30:28 -0000
@@ -2515,6 +2515,8 @@
 {
        const XEvent *te = ea->exc->x.etrigger;
        FvwmWindow * const fw = ea->exc->w.fw;
+       XEvent d;
+       Bool is_tear_off_menu;
 
        DBUG("HandleLeaveNotify", "Routine Entered");
 
@@ -2553,6 +2555,23 @@
 #endif
                return;
        }
+
+       /* look for a matching EnterNotify which would nullify this LeaveNotify
+        */
+       is_tear_off_menu =
+               (fw && IS_TEAR_OFF_MENU(fw) && 
+                te->xcrossing.window == FW_W(fw));
+       if (!fFvwmInStartup && !is_tear_off_menu &&
+           FCheckTypedWindowEvent(dpy, te->xcrossing.window, EnterNotify, &d))
+       {
+               if (d.xcrossing.mode == NotifyNormal &&
+                   d.xcrossing.detail != NotifyInferior)
+               {
+ENTER_DBG((stderr, "en: exit: found EnterNotify\n"));
+                       return;
+               }
+       }
+
        /* CDE-like behaviour of raising the icon title if the icon
           gets the focus (in particular if the cursor is over the icon) */
        if (fw && IS_ICONIFIED(fw))

Reply via email to