From cf181fe109016de72d98ec60f0c598f77974d931 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 14 Nov 2013 12:58:52 -0500 Subject: [PATCH] display: Adapt to new clutter event filter API --- src/core/display-private.h | 2 ++ src/core/display.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/core/display-private.h b/src/core/display-private.h index c4e38d81d..da85ade10 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h @@ -102,6 +102,8 @@ struct _MetaDisplay char *name; Display *xdisplay; + int clutter_event_filter; + Window leader_window; Window timestamp_pinging_window; diff --git a/src/core/display.c b/src/core/display.c index 0d437760c..3d07c2080 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -592,8 +592,11 @@ meta_display_open (void) meta_ui_add_event_func (the_display->xdisplay, xevent_callback, the_display); - clutter_event_add_filter (event_callback, the_display); - + the_display->clutter_event_filter = clutter_event_add_filter (NULL, + event_callback, + NULL, + the_display); + the_display->xids = g_hash_table_new (meta_unsigned_long_hash, meta_unsigned_long_equal); the_display->wayland_windows = g_hash_table_new (NULL, NULL); @@ -1124,7 +1127,8 @@ meta_display_close (MetaDisplay *display, meta_ui_remove_event_func (display->xdisplay, xevent_callback, display); - clutter_event_remove_filter (event_callback, display); + clutter_event_remove_filter (display->clutter_event_filter); + display->clutter_event_filter = 0; /* Free all screens */ tmp = display->screens;