diff --git a/src/core/display.c b/src/core/display.c index 95271b46f..527cb1e13 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -65,6 +65,7 @@ #include #include +#include "x11/events.h" #include "x11/window-x11.h" #include "x11/window-props.h" #include "x11/group-props.h" @@ -622,6 +623,7 @@ meta_display_open (void) /* Get events */ meta_display_init_events (display); + meta_display_init_events_x11 (display); display->xids = g_hash_table_new (meta_unsigned_long_hash, meta_unsigned_long_equal); @@ -1086,6 +1088,7 @@ meta_display_close (MetaDisplay *display, display->focus_timeout_id = 0; /* Stop caring about events */ + meta_display_free_events_x11 (display); meta_display_free_events (display); meta_screen_free (display->screen, timestamp); diff --git a/src/core/events.c b/src/core/events.c index 6fd141f3e..c64c07ddb 100644 --- a/src/core/events.c +++ b/src/core/events.c @@ -34,7 +34,6 @@ #include "backends/native/meta-idle-monitor-native.h" #endif -#include "x11/events.h" #ifdef HAVE_WAYLAND #include "wayland/meta-wayland-private.h" #endif @@ -315,9 +314,8 @@ event_callback (const ClutterEvent *event, } void -meta_display_init_events (MetaDisplay *display) +meta_display_init_events (MetaInputRouter *router) { - meta_display_init_events_x11 (display); display->clutter_event_filter = clutter_event_add_filter (NULL, event_callback, NULL, @@ -327,7 +325,6 @@ meta_display_init_events (MetaDisplay *display) void meta_display_free_events (MetaDisplay *display) { - meta_display_free_events_x11 (display); clutter_event_remove_filter (display->clutter_event_filter); display->clutter_event_filter = 0; }