backend/eglx: Add newly created stages to the translators

The events directed to the stage should be translated by the stage.
This commit is contained in:
Emmanuele Bassi 2011-01-19 15:17:34 +00:00
parent d3ed3d3a7b
commit 137f7d42a8

View File

@ -750,6 +750,7 @@ clutter_backend_egl_create_stage (ClutterBackend *backend,
{ {
#ifdef COGL_HAS_XLIB_SUPPORT #ifdef COGL_HAS_XLIB_SUPPORT
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend); ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);
ClutterEventTranslator *translator;
ClutterStageWindow *stage; ClutterStageWindow *stage;
ClutterStageX11 *stage_x11; ClutterStageX11 *stage_x11;
@ -762,6 +763,9 @@ clutter_backend_egl_create_stage (ClutterBackend *backend,
stage_x11 = CLUTTER_STAGE_X11 (stage); stage_x11 = CLUTTER_STAGE_X11 (stage);
stage_x11->wrapper = wrapper; stage_x11->wrapper = wrapper;
translator = CLUTTER_EVENT_TRANSLATOR (stage_x11);
_clutter_backend_x11_add_event_translator (backend_x11, translator);
CLUTTER_NOTE (MISC, "EGLX stage created (display:%p, screen:%d, root:%u)", CLUTTER_NOTE (MISC, "EGLX stage created (display:%p, screen:%d, root:%u)",
backend_x11->xdpy, backend_x11->xdpy,
backend_x11->xscreen_num, backend_x11->xscreen_num,