mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
display: Init X11 events separately
This commit is contained in:
parent
a0e3c05428
commit
d931af33c4
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user