display: Init X11 events separately
This commit is contained in:
parent
a0e3c05428
commit
d931af33c4
@ -65,6 +65,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "x11/events.h"
|
||||||
#include "x11/window-x11.h"
|
#include "x11/window-x11.h"
|
||||||
#include "x11/window-props.h"
|
#include "x11/window-props.h"
|
||||||
#include "x11/group-props.h"
|
#include "x11/group-props.h"
|
||||||
@ -622,6 +623,7 @@ meta_display_open (void)
|
|||||||
|
|
||||||
/* Get events */
|
/* Get events */
|
||||||
meta_display_init_events (display);
|
meta_display_init_events (display);
|
||||||
|
meta_display_init_events_x11 (display);
|
||||||
|
|
||||||
display->xids = g_hash_table_new (meta_unsigned_long_hash,
|
display->xids = g_hash_table_new (meta_unsigned_long_hash,
|
||||||
meta_unsigned_long_equal);
|
meta_unsigned_long_equal);
|
||||||
@ -1086,6 +1088,7 @@ meta_display_close (MetaDisplay *display,
|
|||||||
display->focus_timeout_id = 0;
|
display->focus_timeout_id = 0;
|
||||||
|
|
||||||
/* Stop caring about events */
|
/* Stop caring about events */
|
||||||
|
meta_display_free_events_x11 (display);
|
||||||
meta_display_free_events (display);
|
meta_display_free_events (display);
|
||||||
|
|
||||||
meta_screen_free (display->screen, timestamp);
|
meta_screen_free (display->screen, timestamp);
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include "backends/native/meta-idle-monitor-native.h"
|
#include "backends/native/meta-idle-monitor-native.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "x11/events.h"
|
|
||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
#include "wayland/meta-wayland-private.h"
|
#include "wayland/meta-wayland-private.h"
|
||||||
#endif
|
#endif
|
||||||
@ -315,9 +314,8 @@ event_callback (const ClutterEvent *event,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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,
|
display->clutter_event_filter = clutter_event_add_filter (NULL,
|
||||||
event_callback,
|
event_callback,
|
||||||
NULL,
|
NULL,
|
||||||
@ -327,7 +325,6 @@ meta_display_init_events (MetaDisplay *display)
|
|||||||
void
|
void
|
||||||
meta_display_free_events (MetaDisplay *display)
|
meta_display_free_events (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
meta_display_free_events_x11 (display);
|
|
||||||
clutter_event_remove_filter (display->clutter_event_filter);
|
clutter_event_remove_filter (display->clutter_event_filter);
|
||||||
display->clutter_event_filter = 0;
|
display->clutter_event_filter = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user