summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2004-12-24 17:27:29 +0000
committerElijah Newren <newren@src.gnome.org>2004-12-24 17:27:29 +0000
commitce8c2d9463183f9ddd6aaf6eb8506b75fce10283 (patch)
tree0d31b95e50c34fcbb57fdcf68c6cd4c04e40e569
parentd5a484479f43026f50a23f6453208dff158455bd (diff)
downloadmetacity-ce8c2d9463183f9ddd6aaf6eb8506b75fce10283.tar.gz
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)
-rw-r--r--ChangeLog8
-rw-r--r--src/window.c16
2 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 2da1d8da..6ff2ef99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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>
+
Thanks to mild7@users.sourceforge.net for this fix.
* src/window.h: (META_WINDOW_IN_NORMAL_TAB_CHAIN): Excludes
diff --git a/src/window.c b/src/window.c
index ccc2a553..3b6a089d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1624,20 +1624,20 @@ window_takes_focus_on_map (MetaWindow *window)
compare = window->initial_timestamp_set ? window->initial_timestamp : 0;
compare = window->net_wm_user_time_set ? window->net_wm_user_time : compare;
- if ((window->display->focus_window == NULL) ||
- XSERVER_TIME_IS_BEFORE (window->display->focus_window->net_wm_user_time, compare))
+ if ((window->display->focus_window != NULL) &&
+ 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;
+ "window %s focus prevented by other activity; %lu is before %lu\n",
+ window->desc, compare, window->display->focus_window->net_wm_user_time);
+ return FALSE;
}
else
{
meta_topic (META_DEBUG_STARTUP,
- "window %s focus prevented by other activity; %lu is before %lu\n",
- window->desc, compare, window->display->focus_window->net_wm_user_time);
- return FALSE;
+ "new window %s with no intervening events\n",
+ window->desc);
+ return TRUE;
}
break;