summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbox/client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 9c06e49e..3b66a836 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -2143,9 +2143,11 @@ static void client_change_wm_state(ObClient *self)
old = self->wmstate;
- if (self->shaded || self->iconic)
+ if (self->shaded || self->iconic ||
+ (self->desktop != DESKTOP_ALL && self->desktop != screen_desktop))
+ {
self->wmstate = IconicState;
- else
+ } else
self->wmstate = NormalState;
if (old != self->wmstate) {