Fix error in distinguishing < vs. <= introduced by the patch in #154598,

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

	* src/window.c (window_takes_focus_on_map): Fix error in
	distinguishing < vs. <= introduced by the patch in #154598,
	restructure code so that verbose log matches code better in order
	ensure such mistakes are harder to make in the future (fixes
	#162172)
This commit is contained in:
Elijah Newren 2004-12-24 17:27:29 +00:00 committed by Elijah Newren
parent d5a484479f
commit ce8c2d9463
2 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2004-12-24 Elijah Newren <newren@gmail.com>
* src/window.c (window_takes_focus_on_map): Fix error in
distinguishing < vs. <= introduced by the patch in #154598,
restructure code so that verbose log matches code better in order
ensure such mistakes are harder to make in the future (fixes
#162172)
2004-12-24 Elijah Newren <newren@gmail.com> 2004-12-24 Elijah Newren <newren@gmail.com>
Thanks to mild7@users.sourceforge.net for this fix. Thanks to mild7@users.sourceforge.net for this fix.

View File

@ -1624,21 +1624,21 @@ window_takes_focus_on_map (MetaWindow *window)
compare = window->initial_timestamp_set ? window->initial_timestamp : 0; compare = window->initial_timestamp_set ? window->initial_timestamp : 0;
compare = window->net_wm_user_time_set ? window->net_wm_user_time : compare; compare = window->net_wm_user_time_set ? window->net_wm_user_time : compare;
if ((window->display->focus_window == NULL) || if ((window->display->focus_window != NULL) &&
XSERVER_TIME_IS_BEFORE (window->display->focus_window->net_wm_user_time, compare)) XSERVER_TIME_IS_BEFORE (compare, window->display->focus_window->net_wm_user_time))
{
meta_topic (META_DEBUG_STARTUP,
"new window %s with no intervening events\n",
window->desc);
return TRUE;
}
else
{ {
meta_topic (META_DEBUG_STARTUP, meta_topic (META_DEBUG_STARTUP,
"window %s focus prevented by other activity; %lu is before %lu\n", "window %s focus prevented by other activity; %lu is before %lu\n",
window->desc, compare, window->display->focus_window->net_wm_user_time); window->desc, compare, window->display->focus_window->net_wm_user_time);
return FALSE; return FALSE;
} }
else
{
meta_topic (META_DEBUG_STARTUP,
"new window %s with no intervening events\n",
window->desc);
return TRUE;
}
break; break;
} }