summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-04-22 04:42:33 +0000
committerDana Jansens <danakj@orodu.net>2007-04-22 04:42:33 +0000
commit63f1b1230c529c2c2b335a4becfae5cd15c0d9a4 (patch)
treea657113dc547ff7a93da277456bc3586033e65e7 /openbox/screen.c
parent6e7abeb86074fd4ea778cfa1480ef6aae7bc4eec (diff)
don't fallback to the desktop again when leaving show-desktop-mode
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c16
1 files changed, 15 insertions, 1 deletions
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 */