From c22a6b32ab23a4193863882e14fc6ff77ed3d247 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 29 Sep 2003 10:05:18 +0000 Subject: [PATCH] only fallback when nothing is focused, provide comment explaining why --- openbox/screen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openbox/screen.c b/openbox/screen.c index a8f3b71c..9c4620b2 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -457,7 +457,13 @@ void screen_set_desktop(guint num) event_ignore_queued_enters(); - focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); + /*! + When this focus_client check is not used, you can end up with races, as + demonstrated with gnome-panel, sometmies the window you click on on + another desktop ends up losing focus cuz of the fallback. + */ + if (!focus_client) + focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); } static void get_row_col(guint d, guint *r, guint *c) -- 2.45.2