From 0c69d23c24c91bc540b9c47042c3da791d0c20ba Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 26 Mar 2003 08:29:34 +0000 Subject: [PATCH] dont let you got to numdesktops+1 --- openbox/event.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.45.2