A better patch has been produced. It has been submitted to clutter upstream. If the patch is accepted, it should be fixed for Maverick.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2148
--- clutter/x11/clutter-event-x11.c 2010-03-18 13:18:06.000000000 -0400 +++ clutter/x11/clutter-event-x11.c 2010-06-21 16:11:10.468517306 -0400 @@ -816,6 +816,28 @@ goto out; }
+ Window child_return, root_return; + int root_x_return, root_y_return; + int win_x_return, win_y_return; + unsigned int mask_return; + + gboolean ret = XQueryPointer(backend_x11->xdpy, xwindow, &root_return, &child_return, &root_x_return, &root_y_return, &win_x_return, &win_y_return, &mask_return); + if (ret && (child_return==None)) + { + /* The mouse is directly over the stage (no obstructing window) */ + 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)) + { + /* The mouse is still inside the stage. Discard the Leave event. */ + 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)",
A better patch has been produced. It has been submitted to clutter upstream. If the patch is accepted, it should be fixed for Maverick.
http:// bugzilla. clutter- project. org/show_ bug.cgi? id=2148
--- clutter/ x11/clutter- event-x11. c 2010-03-18 13:18:06.000000000 -0400 x11/clutter- event-x11. c 2010-06-21 16:11:10.468517306 -0400
+++ clutter/
@@ -816,6 +816,28 @@
goto out;
}
+ Window child_return, root_return; backend_ x11->xdpy, xwindow, &root_return, &child_return, &root_x_return, &root_y_return, &win_x_return, &win_y_return, &mask_return); return= =None)) >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)",
+ int root_x_return, root_y_return;
+ int win_x_return, win_y_return;
+ unsigned int mask_return;
+
+ gboolean ret = XQueryPointer(
+ if (ret && (child_
+ {
+ /* The mouse is directly over the stage (no obstructing window) */
+ gint x, y;
+ guint width, height, border, depth;
+ XGetGeometry (backend_x11->xdpy, xwindow, &root_return, &x, &y, &width, &height, &border, &depth);
+
+ if ((xevent-
+ {
+ /* The mouse is still inside the stage. Discard the Leave event. */
+ CLUTTER_NOTE(EVENT, "Discarding Leave Event");
+ res = FALSE;
+ goto out;
+ }
+ }
+
/* we know that we are leaving the stage here */