Avoid using CurrentTime when focusing, handle it better in case we miss
2005-02-08 Elijah Newren <newren@gmail.com> Avoid using CurrentTime when focusing, handle it better in case we miss any cases. Fixes #166732. * src/window.c: (meta_window_shade): use meta_display_get_current_time_roundtrip() to ensure we have a valid timestamp, (meta_window_unshade): same * src/display.c: (meta_display_set_input_focus_window): If CurrentTime was passed, get one from the XServer in addition to throwing a warning, (meta_display_focus_the_no_focus_window): same
This commit is contained in:
parent
454e595ef8
commit
fe1416c65f
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2005-02-08 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Avoid using CurrentTime when focusing, handle it better in case we
|
||||
miss any cases. Fixes #166732.
|
||||
|
||||
* src/window.c: (meta_window_shade): use
|
||||
meta_display_get_current_time_roundtrip() to ensure we have a
|
||||
valid timestamp, (meta_window_unshade): same
|
||||
|
||||
* src/display.c: (meta_display_set_input_focus_window): If
|
||||
CurrentTime was passed, get one from the XServer in addition to
|
||||
throwing a warning, (meta_display_focus_the_no_focus_window): same
|
||||
|
||||
2005-02-08 Elijah Newren <newren@gmail.com>
|
||||
|
||||
* src/window.c: (meta_window_activate): If we're not passed a
|
||||
|
@ -4660,6 +4660,7 @@ meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
"timestamp of 0 for window %s. This shouldn't happen!\n",
|
||||
window->desc);
|
||||
meta_print_backtrace ();
|
||||
timestamp = meta_display_get_current_time_roundtrip (display);
|
||||
}
|
||||
else if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
|
||||
return;
|
||||
@ -4684,6 +4685,7 @@ meta_display_focus_the_no_focus_window (MetaDisplay *display,
|
||||
meta_warning ("meta_display_focus_the_no_focus_window called with a "
|
||||
"timestamp of 0. This shouldn't happen!\n");
|
||||
meta_print_backtrace ();
|
||||
timestamp = meta_display_get_current_time_roundtrip (display);
|
||||
}
|
||||
else if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
|
||||
{
|
||||
|
@ -2109,7 +2109,7 @@ meta_window_shade (MetaWindow *window)
|
||||
"Re-focusing window %s after shading it\n",
|
||||
window->desc);
|
||||
meta_window_focus (window,
|
||||
meta_display_get_current_time (window->display));
|
||||
meta_display_get_current_time_roundtrip (window->display));
|
||||
|
||||
set_net_wm_state (window);
|
||||
}
|
||||
@ -2130,7 +2130,8 @@ meta_window_unshade (MetaWindow *window)
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing window %s after unshading it\n",
|
||||
window->desc);
|
||||
meta_window_focus (window, meta_display_get_current_time (window->display));
|
||||
meta_window_focus (window,
|
||||
meta_display_get_current_time_roundtrip (window->display));
|
||||
|
||||
set_net_wm_state (window);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user