mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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:
parent
3715a6687c
commit
0cef63b837
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user