]> Dogcows Code - chaz/openbox/commitdiff
dont change desktop when its out of range
authorDana Jansens <danakj@orodu.net>
Tue, 25 Mar 2003 23:59:50 +0000 (23:59 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 25 Mar 2003 23:59:50 +0000 (23:59 +0000)
openbox/event.c

index 6560402f6e6a01dba8c845376b5ef01b5ad1f619..69b63ff1334887c766dac083e0eab748d7824bd4 100644 (file)
@@ -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",
This page took 0.024317 seconds and 4 git commands to generate.