From: Dana Jansens Date: Wed, 26 Mar 2003 08:29:34 +0000 (+0000) Subject: dont let you got to numdesktops+1 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=0c69d23c24c91bc540b9c47042c3da791d0c20ba;p=chaz%2Fopenbox dont let you got to numdesktops+1 --- diff --git a/openbox/event.c b/openbox/event.c index 26c218d0..fa5f29ff 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -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 */