win32: Disable event retrieval in Cogl

Since commit 4543ed6ac3 in Cogl, Cogl will now try to consume
Windows message itself. This doesn't really cause any problems because
both message loops just call DispatchMessage which will cause the
message to be routed through Clutter's window procedure either way.
However, it's not great to have two sources listening for messages so
this patch disables Cogl's message retrieval.

https://bugzilla.gnome.org/show_bug.cgi?id=701356
This commit is contained in:
Neil Roberts 2013-05-31 14:18:01 +01:00
parent 3715a6687c
commit 0cef63b837
2 changed files with 20 additions and 0 deletions

View File

@ -279,6 +279,7 @@ clutter_backend_gdk_get_renderer (ClutterBackend *backend,
{
/* Force a WGL winsys on windows */
cogl_renderer_set_winsys_id (renderer, COGL_WINSYS_ID_WGL);
cogl_win32_renderer_set_event_retrieval_enabled (renderer, FALSE);
}
else
#endif

View File

@ -178,6 +178,24 @@ clutter_win32_disable_event_retrieval (void)
_no_event_retrieval = TRUE;
}
static CoglRenderer *
clutter_backend_win32_get_renderer (ClutterBackend *backend,
GError **error)
{
CoglRenderer *renderer;
CLUTTER_NOTE (BACKEND, "Creating a new WGL renderer");
renderer = cogl_renderer_new ();
cogl_renderer_set_winsys_id (renderer, COGL_WINSYS_ID_WGL);
/* We don't want Cogl to install its default event handler because
* we'll handle them manually */
cogl_win32_renderer_set_event_retrieval_enabled (renderer, FALSE);
return renderer;
}
static void
clutter_backend_win32_class_init (ClutterBackendWin32Class *klass)
{
@ -192,6 +210,7 @@ clutter_backend_win32_class_init (ClutterBackendWin32Class *klass)
backend_class->init_events = clutter_backend_win32_init_events;
backend_class->get_features = clutter_backend_win32_get_features;
backend_class->get_renderer = clutter_backend_win32_get_renderer;
}
static void