The patch:
--- clutter/x11/clutter-event-x11.c 2010-03-18 13:18:06.000000000 -0400 +++ clutter/x11/clutter-event-x11.c 2010-06-18 13:05:09.243912688 -0400 @@ -816,6 +816,22 @@ goto out; }
+ if (g_getenv ("CLUTTER_CHECK_LEAVE_EVENTS")) + { + Window root_return; + gint x, y; + guint width, height, border, depth; + + XGetGeometry (backend_x11->xdpy, xwindow, &root_return, &x, &y, &width, &height, &border, &depth); + + if ((xevent->xcrossing.x >= x) && (xevent->xcrossing.x < x+width) && (xevent->xcrossing.y >= y) && (xevent->xcrossing.y < y+height)) + { + CLUTTER_NOTE(EVENT, "Discarding Leave Event"); + res = FALSE; + goto out; + } + } + /* we know that we are leaving the stage here */ _clutter_input_device_set_stage (device, NULL); CLUTTER_NOTE (EVENT, "Leaving the stage (time:%u)",
The patch:
--- clutter/ x11/clutter- event-x11. c 2010-03-18 13:18:06.000000000 -0400 x11/clutter- event-x11. c 2010-06-18 13:05:09.243912688 -0400
+++ clutter/
@@ -816,6 +816,22 @@
goto out;
}
+ if (g_getenv ("CLUTTER_ CHECK_LEAVE_ EVENTS" )) >xcrossing. x >= x) && (xevent- >xcrossing. x < x+width) && (xevent- >xcrossing. y >= y) && (xevent- >xcrossing. y < y+height))
_clutter_ input_device_ set_stage (device, NULL);
CLUTTER_ NOTE (EVENT, "Leaving the stage (time:%u)",
+ {
+ Window root_return;
+ gint x, y;
+ guint width, height, border, depth;
+
+ XGetGeometry (backend_x11->xdpy, xwindow, &root_return, &x, &y, &width, &height, &border, &depth);
+
+ if ((xevent-
+ {
+ CLUTTER_NOTE(EVENT, "Discarding Leave Event");
+ res = FALSE;
+ goto out;
+ }
+ }
+
/* we know that we are leaving the stage here */