summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@comhem.se>2007-05-25 15:34:31 +0000
committerMikael Magnusson <mikachu@comhem.se>2007-05-25 15:34:31 +0000
commitddd2a4da21e5696f1fc28fee6581744d888b59a7 (patch)
tree493cfcadfcd12dd98c7adae2be4e40aca78c22c8 /openbox/screen.c
parent336011efb19600107313785b56c32dd12a69dc1f (diff)
check desktop switching stuff in screen_set_desktop
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbox/screen.c b/openbox/screen.c
index c566a908..1c058d99 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -536,7 +536,11 @@ void screen_set_desktop(guint num, gboolean dofocus)
do this before hiding the windows so if helper windows are coming
with us, they don't get hidden
*/
- if (dofocus && (c = focus_fallback(TRUE))) {
+ if (dofocus
+ && (!focus_client || (focus->client.desktop != DESKTOP_ALL
+ && focus->client.desktop != num))
+ && (c = focus_fallback(TRUE)))
+ {
/* only do the flicker reducing stuff ahead of time if we are going
to call xsetinputfocus on the window ourselves. otherwise there is
no guarantee the window will actually take focus.. */