[mutter/wip/xinput2: 25/49] Replace XAllowEvents with meta_device_allow_events()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/xinput2: 25/49] Replace XAllowEvents with meta_device_allow_events()
- Date: Fri, 15 Jul 2011 16:31:11 +0000 (UTC)
commit 3f7193e5581b14efb413cfa8f773a52b66bcf3fc
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jun 13 12:33:15 2011 +0200
Replace XAllowEvents with meta_device_allow_events()
src/core/display.c | 8 +++++---
src/core/keybindings.c | 9 ++++++---
2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 5ce306c..12263d2 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1731,6 +1731,7 @@ event_callback (XEvent *event,
Time evtime = meta_input_event_get_time (display, event);
guint n_button, state, mode, detail;
gdouble ev_root_x, ev_root_y;
+ MetaDevice *device;
if (window && !window->override_redirect &&
((evtype == KeyPress) || (evtype == ButtonPress)))
@@ -1752,6 +1753,8 @@ event_callback (XEvent *event,
}
}
+ device = meta_input_event_get_device (display, event);
+
switch (evtype)
{
case KeyPress:
@@ -1950,8 +1953,7 @@ event_callback (XEvent *event,
mode == AsyncPointer ? "AsyncPointer" : "ReplayPointer",
(unsigned int) evtime);
- XAllowEvents (display->xdisplay,
- mode, evtime);
+ meta_device_allow_events (device, mode, evtime);
}
if (begin_move && window->has_move_func)
@@ -3879,7 +3881,7 @@ meta_change_button_grab (MetaDisplay *display,
if (meta_is_debugging ())
meta_error_trap_push_with_return (display);
- /* GrabModeSync means freeze until XAllowEvents */
+ /* GrabModeSync means freeze until X(I)AllowEvents */
if (grab)
XGrabButton (display->xdisplay, button, modmask | ignored_mask,
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 98d33ff..c963937 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1419,6 +1419,7 @@ meta_display_process_key_event (MetaDisplay *display,
const char *str;
MetaScreen *screen;
guint evtype, keycode, state;
+ MetaDevice *keyboard;
Window xwindow;
Time evtime;
@@ -1428,9 +1429,11 @@ meta_display_process_key_event (MetaDisplay *display,
return FALSE;
evtime = meta_input_event_get_time (display, event);
- XAllowEvents (display->xdisplay,
- all_bindings_disabled ? ReplayKeyboard : AsyncKeyboard,
- evtime);
+ keyboard = meta_input_event_get_device (display, event);
+
+ meta_device_allow_events (keyboard,
+ all_bindings_disabled ? ReplayKeyboard : AsyncKeyboard,
+ evtime);
if (all_bindings_disabled)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]