Call backend handle_event from clutter_x11_handle_event()

Whether events come from the main loop source or from
clutter_x11_handle_event(), we need to feed them to the backend
virtual handle_event function. This fixes problems with clients
using clutter_x11_handle_event() hanging because
GLXBufferSwapComplete events aren't received.

http://bugzilla.openedhand.com/show_bug.cgi?id=2101
This commit is contained in:
Owen W. Taylor 2010-04-30 14:50:11 -04:00 committed by Robert Bragg
parent d6dbd62021
commit f9072b8663

View File

@ -1048,13 +1048,14 @@ ClutterX11FilterReturn
clutter_x11_handle_event (XEvent *xevent)
{
ClutterBackend *backend;
ClutterBackendX11Class *backend_x11_class;
ClutterEvent *event;
ClutterMainContext *clutter_context;
ClutterX11FilterReturn result;
gint spin = 1;
/* The return values here are someone approximate; we return
* CLUTTER_X11_FILTER_REMOVE if and only if a clutter event is
* CLUTTER_X11_FILTER_REMOVE if a clutter event is
* generated for the event. This mostly, but not entirely,
* corresponds to whether other event processing should be
* excluded. As long as the stage window is not shared with another
@ -1068,6 +1069,13 @@ clutter_x11_handle_event (XEvent *xevent)
clutter_context = _clutter_context_get_default ();
backend = clutter_context->backend;
backend_x11_class = CLUTTER_BACKEND_X11_GET_CLASS (backend);
/* If the backend just observed the event and didn't want it
* removed it could return FALSE, so assume that a TRUE return
* means that our caller should also do no further processing. */
if (backend_x11_class->handle_event (CLUTTER_BACKEND_X11(backend), xevent))
return CLUTTER_X11_FILTER_REMOVE;
event = clutter_event_new (CLUTTER_NOTHING);