client_unmanage(client);
break;
case MapRequest:
- if (!client->iconic) break; /* this normal doesn't happen, but if it
+ if (!client->iconic) break; /* this normally doesn't happen, but if it
does, we don't want it! */
if (screen_showing_desktop)
screen_show_desktop(FALSE);
}
e->xclient = ce.xclient;
}
- client_set_desktop(client, e->xclient.data.l[0]);
+ if (e->xclient.data.l[0] >= 0 &&
+ e->xclient.data.l[0] < screen_num_desktops)
+ client_set_desktop(client, e->xclient.data.l[0]);
} else if (msgtype == prop_atoms.net_wm_state) {
/* can't compress these */
g_message("net_wm_state %s %ld %ld for 0x%lx",