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