diff --git a/openbox/event.c b/openbox/event.c index d7c723d1..4f57aaee 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -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);