[mutter/wayland] display: Adapt to new clutter event filter API



commit cf181fe109016de72d98ec60f0c598f77974d931
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Nov 14 12:58:52 2013 -0500

    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 c4e38d8..da85ade 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 0d43776..3d07c20 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]