]> Dogcows Code - chaz/openbox/commitdiff
dont let you got to numdesktops+1
authorDana Jansens <danakj@orodu.net>
Wed, 26 Mar 2003 08:29:34 +0000 (08:29 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 26 Mar 2003 08:29:34 +0000 (08:29 +0000)
openbox/event.c

index 26c218d0ada8ac698f2977525897feeba95721ca..fa5f29ffdd3e18cfba2770b52307d850f4525d98 100644 (file)
@@ -297,7 +297,7 @@ static void event_handle_root(XEvent *e)
        msgtype = e->xclient.message_type;
        if (msgtype == prop_atoms.net_current_desktop) {
            unsigned int d = e->xclient.data.l[0];
-           if (d <= screen_num_desktops)
+           if (d < screen_num_desktops)
                screen_set_desktop(d);
        } else if (msgtype == prop_atoms.net_number_of_desktops) {
            unsigned int d = e->xclient.data.l[0];
@@ -482,7 +482,8 @@ static void event_handle_client(Client *client, XEvent *e)
                }
                e->xclient = ce.xclient;
            }
-            if ((unsigned)e->xclient.data.l[0] < screen_num_desktops)
+            if ((unsigned)e->xclient.data.l[0] < screen_num_desktops ||
+                (unsigned)e->xclient.data.l[0] == DESKTOP_ALL)
                 client_set_desktop(client, (unsigned)e->xclient.data.l[0]);
        } else if (msgtype == prop_atoms.net_wm_state) {
            /* can't compress these */
This page took 0.027323 seconds and 4 git commands to generate.