map to the highest possible desktop if a desktop too large is requested
This commit is contained in:
parent
fb1c1a8163
commit
2df4d8c7aa
1 changed files with 5 additions and 3 deletions
|
@ -155,9 +155,11 @@ void Client::getDesktop()
|
||||||
|
|
||||||
if (otk::Property::get(_window, otk::Property::atoms.net_wm_desktop,
|
if (otk::Property::get(_window, otk::Property::atoms.net_wm_desktop,
|
||||||
otk::Property::atoms.cardinal,
|
otk::Property::atoms.cardinal,
|
||||||
(long unsigned*)&d) &&
|
(long unsigned*)&d)) {
|
||||||
d < openbox->screen(_screen)->numDesktops()) {
|
if (d >= openbox->screen(_screen)->numDesktops() &&
|
||||||
_desktop = d;
|
d != 0xffffffff)
|
||||||
|
d = openbox->screen(_screen)->numDesktops() - 1;
|
||||||
|
_desktop = d;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// printf("Window requested desktop: %ld\n", _desktop);
|
// printf("Window requested desktop: %ld\n", _desktop);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue