Spew warning if CurrentTime is passed to the function, but don't exit

2004-12-27  Elijah Newren  <newren@gmail.com>

	* src/display.c (meta_display_set_input_focus_window,
	meta_display_focus_the_no_focus_window): Spew warning if
	CurrentTime is passed to the function, but don't exit prematurely.
	(fixes #162353)
This commit is contained in:
Elijah Newren 2004-12-28 05:55:58 +00:00 committed by Elijah Newren
parent 1ce080d733
commit 0bf6bffb16
2 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2004-12-27 Elijah Newren <newren@gmail.com>
* src/display.c (meta_display_set_input_focus_window,
meta_display_focus_the_no_focus_window): Spew warning if
CurrentTime is passed to the function, but don't exit prematurely.
(fixes #162353)
2004-12-24 Elijah Newren <newren@gmail.com>
* src/window.c (meta_window_show_menu): Don't show menu if all
@ -59,7 +66,7 @@
Rename meta_window_visible_on_workspace to
meta_window_located_on_workspace (whether or not the window was
showing wasn't taken into account, which made "visible"
confusing).
confusing). Fixes #136314.
2004-12-22 Elijah Newren <newren@gmail.com>

View File

@ -4611,7 +4611,14 @@ meta_display_set_input_focus_window (MetaDisplay *display,
gboolean focus_frame,
Time timestamp)
{
if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
if (timestamp == CurrentTime)
{
meta_warning ("meta_display_set_input_focus_window called with a "
"timestamp of 0 for window %s. This shouldn't happen!\n",
window->desc);
meta_print_backtrace ();
}
else if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
return;
XSetInputFocus (display->xdisplay,
@ -4629,8 +4636,17 @@ void
meta_display_focus_the_no_focus_window (MetaDisplay *display,
Time timestamp)
{
if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
if (timestamp == CurrentTime)
{
meta_warning ("meta_display_focus_the_no_focus_window called with a "
"timestamp of 0. This shouldn't happen!\n");
meta_print_backtrace ();
}
else if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
{
meta_warning ("Ignoring focus request for no_focus_window since %lu is less than %lu.\n", timestamp, display->last_focus_time);
return;
}
XSetInputFocus (display->xdisplay,
display->no_focus_window,