} else {
self->iconic = iconic;
- if (curdesk)
+ if (curdesk && self->desktop != screen_desktop &&
+ self->desktop != DESKTOP_ALL)
client_set_desktop(self, screen_desktop, FALSE);
/* this puts it after the current focused window */
if (self->iconic)
client_iconify(self, FALSE, here);
if (self->desktop != DESKTOP_ALL &&
- self->desktop != screen_desktop) {
+ self->desktop != screen_desktop)
+ {
if (here)
client_set_desktop(self, screen_desktop, FALSE);
else