only map on a requested desktop if its not out of range

This commit is contained in:
Dana Jansens 2003-02-19 09:33:30 +00:00
parent c29a1f1430
commit fb1c1a8163

View file

@ -151,10 +151,13 @@ void Client::getDesktop()
{
// defaults to the current desktop
_desktop = openbox->screen(_screen)->desktop();
unsigned int d;
if (otk::Property::get(_window, otk::Property::atoms.net_wm_desktop,
otk::Property::atoms.cardinal,
(long unsigned*)&_desktop)) {
(long unsigned*)&d) &&
d < openbox->screen(_screen)->numDesktops()) {
_desktop = d;
#ifdef DEBUG
// printf("Window requested desktop: %ld\n", _desktop);
#endif