dont let you got to numdesktops+1
This commit is contained in:
parent
7c6c4984b3
commit
0c69d23c24
1 changed files with 3 additions and 2 deletions
|
@ -297,7 +297,7 @@ static void event_handle_root(XEvent *e)
|
||||||
msgtype = e->xclient.message_type;
|
msgtype = e->xclient.message_type;
|
||||||
if (msgtype == prop_atoms.net_current_desktop) {
|
if (msgtype == prop_atoms.net_current_desktop) {
|
||||||
unsigned int d = e->xclient.data.l[0];
|
unsigned int d = e->xclient.data.l[0];
|
||||||
if (d <= screen_num_desktops)
|
if (d < screen_num_desktops)
|
||||||
screen_set_desktop(d);
|
screen_set_desktop(d);
|
||||||
} else if (msgtype == prop_atoms.net_number_of_desktops) {
|
} else if (msgtype == prop_atoms.net_number_of_desktops) {
|
||||||
unsigned int d = e->xclient.data.l[0];
|
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;
|
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]);
|
client_set_desktop(client, (unsigned)e->xclient.data.l[0]);
|
||||||
} else if (msgtype == prop_atoms.net_wm_state) {
|
} else if (msgtype == prop_atoms.net_wm_state) {
|
||||||
/* can't compress these */
|
/* can't compress these */
|
||||||
|
|
Loading…
Reference in a new issue