display: Init X11 events separately

This commit is contained in:
Jasper St. Pierre 2014-08-15 12:48:55 -04:00
parent a0e3c05428
commit d931af33c4
2 changed files with 4 additions and 4 deletions

View File

@ -65,6 +65,7 @@
#include <string.h>
#include <unistd.h>
#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);

View File

@ -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;
}