mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -05:00
Replace XAllowEvents with meta_device_allow_events()
This commit is contained in:
parent
3af9de08ab
commit
3f7193e558
@ -1731,6 +1731,7 @@ event_callback (XEvent *event,
|
|||||||
Time evtime = meta_input_event_get_time (display, event);
|
Time evtime = meta_input_event_get_time (display, event);
|
||||||
guint n_button, state, mode, detail;
|
guint n_button, state, mode, detail;
|
||||||
gdouble ev_root_x, ev_root_y;
|
gdouble ev_root_x, ev_root_y;
|
||||||
|
MetaDevice *device;
|
||||||
|
|
||||||
if (window && !window->override_redirect &&
|
if (window && !window->override_redirect &&
|
||||||
((evtype == KeyPress) || (evtype == ButtonPress)))
|
((evtype == KeyPress) || (evtype == ButtonPress)))
|
||||||
@ -1752,6 +1753,8 @@ event_callback (XEvent *event,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
device = meta_input_event_get_device (display, event);
|
||||||
|
|
||||||
switch (evtype)
|
switch (evtype)
|
||||||
{
|
{
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
@ -1950,8 +1953,7 @@ event_callback (XEvent *event,
|
|||||||
mode == AsyncPointer ? "AsyncPointer" : "ReplayPointer",
|
mode == AsyncPointer ? "AsyncPointer" : "ReplayPointer",
|
||||||
(unsigned int) evtime);
|
(unsigned int) evtime);
|
||||||
|
|
||||||
XAllowEvents (display->xdisplay,
|
meta_device_allow_events (device, mode, evtime);
|
||||||
mode, evtime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (begin_move && window->has_move_func)
|
if (begin_move && window->has_move_func)
|
||||||
@ -3879,7 +3881,7 @@ meta_change_button_grab (MetaDisplay *display,
|
|||||||
if (meta_is_debugging ())
|
if (meta_is_debugging ())
|
||||||
meta_error_trap_push_with_return (display);
|
meta_error_trap_push_with_return (display);
|
||||||
|
|
||||||
/* GrabModeSync means freeze until XAllowEvents */
|
/* GrabModeSync means freeze until X(I)AllowEvents */
|
||||||
|
|
||||||
if (grab)
|
if (grab)
|
||||||
XGrabButton (display->xdisplay, button, modmask | ignored_mask,
|
XGrabButton (display->xdisplay, button, modmask | ignored_mask,
|
||||||
|
@ -1419,6 +1419,7 @@ meta_display_process_key_event (MetaDisplay *display,
|
|||||||
const char *str;
|
const char *str;
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
guint evtype, keycode, state;
|
guint evtype, keycode, state;
|
||||||
|
MetaDevice *keyboard;
|
||||||
Window xwindow;
|
Window xwindow;
|
||||||
Time evtime;
|
Time evtime;
|
||||||
|
|
||||||
@ -1428,7 +1429,9 @@ meta_display_process_key_event (MetaDisplay *display,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
evtime = meta_input_event_get_time (display, event);
|
evtime = meta_input_event_get_time (display, event);
|
||||||
XAllowEvents (display->xdisplay,
|
keyboard = meta_input_event_get_device (display, event);
|
||||||
|
|
||||||
|
meta_device_allow_events (keyboard,
|
||||||
all_bindings_disabled ? ReplayKeyboard : AsyncKeyboard,
|
all_bindings_disabled ? ReplayKeyboard : AsyncKeyboard,
|
||||||
evtime);
|
evtime);
|
||||||
if (all_bindings_disabled)
|
if (all_bindings_disabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user