> Looks like FvwmButtons is ignoring more LeaveNotify events than it
> should.
>
I don't know if this is how it should be fixed, but looking for an
existing subwindow of the XCrossingEvent seems to work well enough.
Se the attached patch.
/Simon Griph
Index: modules/ChangeLog
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/ChangeLog,v
retrieving revision 1.1261
diff -u -r1.1261 ChangeLog
--- modules/ChangeLog 22 Jul 2007 17:54:54 -0000 1.1261
+++ modules/ChangeLog 22 Jul 2007 20:44:03 -0000
@@ -1,5 +1,12 @@
2007-07-22 Simon Griph <simon(at)griph(dot)se>
+ * FvwmButtons/FvwmButtons.c (Loop):
+ (reallyLeaveWindow):
+ don't ignore LeaveNotify when the pointer moves
+ from a swallowed window to an overlaping window.
+
+2007-07-22 Simon Griph <simon(at)griph(dot)se>
+
* FvwmButtons/FvwmButtons.c (handle_new_position):
make container specific ActiveColorset work without
ActiveIcon/ActiveTitle.
Index: modules/FvwmButtons/FvwmButtons.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmButtons/FvwmButtons.c,v
retrieving revision 1.206
diff -u -r1.206 FvwmButtons.c
--- modules/FvwmButtons/FvwmButtons.c 22 Jul 2007 17:54:54 -0000 1.206
+++ modules/FvwmButtons/FvwmButtons.c 22 Jul 2007 20:44:05 -0000
@@ -879,30 +879,6 @@
return 0;
}
-/* We get LeaveNotify events when the mouse enters a swallowed window of
- FvwmButtons, but we're not interested in these situations. */
-static Bool reallyLeaveWindow(
- const int x, const int y, const Window win, const button_info *b)
-{
- if (x < 0 || x >= Width || y < 0 || y >= Height)
- {
- return True;
- }
-
- if (b == NULL)
- {
- b = select_button(UberButton, x, y);
- }
-
- /* TODO: fix situation when mouse enters window overlapping
- with a b_Swallow button. */
- if (b->flags.b_Swallow)
- {
- return False;
- }
- return True;
-}
-
static button_info *handle_new_position(
button_info *b, int pos_x, int pos_y)
{
@@ -1260,9 +1236,19 @@
break;
case LeaveNotify:
- {
- if (reallyLeaveWindow(Event.xcrossing.x, Event.xcrossing.y,
- Event.xcrossing.window, NULL))
+ if (
+ Event.xcrossing.x < 0 || Event.xcrossing.x >= Width ||
+ Event.xcrossing.y < 0 || Event.xcrossing.y >= Height ||
+
+ /* We get LeaveNotify events when the mouse enters
+ a swallowed window of FvwmButtons, but we're not
+ interested in these situations. */
+ !select_button(UberButton, x, y)->flags.b_Swallow ||
+
+ /* But we're interested in those situations when
+ the mouse enters a window which overlaps with
+ the swallowed window. */
+ Event.xcrossing.subwindow != NULL)
{
if (ActiveButton)
{
@@ -1276,7 +1262,7 @@
}
}
break;
- }
+
case KeyPress:
XLookupString(&Event.xkey, buffer, 10, &keysym, 0);
if (