From: Dana Jansens Date: Sun, 22 Apr 2007 04:43:10 +0000 (+0000) Subject: merge r5774-r5775 from trunk X-Git-Tag: openbox-3_3_991-RELEASE~244 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=79d76ece27c452e0f1c99dbbdbe3c80df56bd349;p=dana%2Fopenbox.git merge r5774-r5775 from trunk --- diff --git a/openbox/client.c b/openbox/client.c index 78a6681d..e801ac18 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -472,7 +472,7 @@ void client_manage(Window window) client_focus(self); } - /* client_activate does this but we aret using it so we have to do it + /* client_activate does this but we aren't using it so we have to do it here as well */ if (screen_showing_desktop) screen_show_desktop(FALSE); diff --git a/openbox/screen.c b/openbox/screen.c index 5f0ef0e7..d5d61f50 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -887,7 +887,21 @@ void screen_show_desktop(gboolean show) break; } } else { - focus_fallback(TRUE); + /* use NULL for the "old" argument because the desktop was focused + and we don't want to fallback to the desktop by default */ + focus_hilite = focus_fallback_target(TRUE, NULL); + if (focus_hilite) { + frame_adjust_focus(focus_hilite->frame, TRUE); + + /*! + When this focus_client check is not used, you can end up with + races, as demonstrated with gnome-panel, sometimes the window + you click on another desktop ends up losing focus cuz of the + focus change here. + */ + /*if (!focus_client)*/ + client_focus(focus_hilite); + } } show = !!show; /* make it boolean */