mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 02:50:41 -05:00
display: Use helper function to get input events' timestamp
This commit is contained in:
parent
1b7a6ce912
commit
7566b4ea17
@ -1720,6 +1720,7 @@ event_callback (XEvent *event,
|
||||
if (meta_input_event_get_type (display, event, &evtype))
|
||||
{
|
||||
Window xwindow = meta_input_event_get_window (display, event);
|
||||
Time evtime = meta_input_event_get_time (display, event);
|
||||
|
||||
if (window && !window->override_redirect &&
|
||||
((evtype == KeyPress) || (evtype == ButtonPress)))
|
||||
@ -1789,8 +1790,7 @@ event_callback (XEvent *event,
|
||||
meta_stack_set_positions (screen->stack,
|
||||
display->grab_old_window_stacking);
|
||||
}
|
||||
meta_display_end_grab_op (display,
|
||||
event->xbutton.time);
|
||||
meta_display_end_grab_op (display, evtime);
|
||||
}
|
||||
else if (window && display->grab_op == META_GRAB_OP_NONE)
|
||||
{
|
||||
@ -1832,7 +1832,7 @@ event_callback (XEvent *event,
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing %s due to unmodified button %u press (display.c)\n",
|
||||
window->desc, event->xbutton.button);
|
||||
meta_window_focus (window, event->xbutton.time);
|
||||
meta_window_focus (window, evtime);
|
||||
}
|
||||
else
|
||||
/* However, do allow terminals to lose focus due to new
|
||||
@ -1891,7 +1891,7 @@ event_callback (XEvent *event,
|
||||
FALSE,
|
||||
event->xbutton.button,
|
||||
0,
|
||||
event->xbutton.time,
|
||||
evtime,
|
||||
event->xbutton.x_root,
|
||||
event->xbutton.y_root);
|
||||
}
|
||||
@ -1904,7 +1904,7 @@ event_callback (XEvent *event,
|
||||
event->xbutton.x_root,
|
||||
event->xbutton.y_root,
|
||||
event->xbutton.button,
|
||||
event->xbutton.time);
|
||||
evtime);
|
||||
}
|
||||
|
||||
if (!frame_was_receiver && unmodified)
|
||||
@ -1932,10 +1932,10 @@ event_callback (XEvent *event,
|
||||
|
||||
meta_verbose ("Allowing events mode %s time %u\n",
|
||||
mode == AsyncPointer ? "AsyncPointer" : "ReplayPointer",
|
||||
(unsigned int)event->xbutton.time);
|
||||
(unsigned int) evtime);
|
||||
|
||||
XAllowEvents (display->xdisplay,
|
||||
mode, event->xbutton.time);
|
||||
mode, evtime);
|
||||
}
|
||||
|
||||
if (begin_move && window->has_move_func)
|
||||
@ -1948,7 +1948,7 @@ event_callback (XEvent *event,
|
||||
FALSE,
|
||||
event->xbutton.button,
|
||||
0,
|
||||
event->xbutton.time,
|
||||
evtime,
|
||||
event->xbutton.x_root,
|
||||
event->xbutton.y_root);
|
||||
}
|
||||
@ -1993,7 +1993,7 @@ event_callback (XEvent *event,
|
||||
if (new_screen != NULL && display->active_screen != new_screen)
|
||||
meta_workspace_focus_default_window (new_screen->active_workspace,
|
||||
NULL,
|
||||
event->xcrossing.time);
|
||||
evtime);
|
||||
}
|
||||
|
||||
/* Check if we've entered a window; do this even if window->has_focus to
|
||||
@ -2019,9 +2019,9 @@ event_callback (XEvent *event,
|
||||
"TRUE.\n",
|
||||
window->desc,
|
||||
event->xany.serial,
|
||||
event->xcrossing.time);
|
||||
evtime);
|
||||
|
||||
meta_window_focus (window, event->xcrossing.time);
|
||||
meta_window_focus (window, evtime);
|
||||
|
||||
/* stop ignoring stuff */
|
||||
reset_ignores (display);
|
||||
@ -2055,7 +2055,7 @@ event_callback (XEvent *event,
|
||||
display->expected_focus_window->desc);
|
||||
meta_display_focus_the_no_focus_window (display,
|
||||
window->screen,
|
||||
event->xcrossing.time);
|
||||
evtime);
|
||||
}
|
||||
break;
|
||||
case META_FOCUS_MODE_CLICK:
|
||||
|
Loading…
Reference in New Issue
Block a user