little sanity check. dont let you create more than 1000 desktops

This commit is contained in:
Dana Jansens 2007-05-23 04:17:30 +00:00
parent e9115802d5
commit 1b82cc481e

View file

@ -679,7 +679,7 @@ static void event_handle_root(XEvent *e)
}
} else if (msgtype == prop_atoms.net_number_of_desktops) {
guint d = e->xclient.data.l[0];
if (d > 0)
if (d > 0 && d <= 1000)
screen_set_num_desktops(d);
} else if (msgtype == prop_atoms.net_showing_desktop) {
screen_show_desktop(e->xclient.data.l[0] != 0, NULL);