X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=69b63ff1334887c766dac083e0eab748d7824bd4;hb=9be1d64d366ba57c1fc986d3d2aee90654a268a8;hp=6560402f6e6a01dba8c845376b5ef01b5ad1f619;hpb=bcdef0b226bb436c5ba5865c3d8dd2eb4bb6aed6;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 6560402f..69b63ff1 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -485,7 +485,9 @@ static void event_handle_client(Client *client, XEvent *e) } 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",