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,
|
||||
otk::Property::atoms.cardinal,
|
||||
(long unsigned*)&d) &&
|
||||
d < openbox->screen(_screen)->numDesktops()) {
|
||||
_desktop = d;
|
||||
(long unsigned*)&d)) {
|
||||
if (d >= openbox->screen(_screen)->numDesktops() &&
|
||||
d != 0xffffffff)
|
||||
d = openbox->screen(_screen)->numDesktops() - 1;
|
||||
_desktop = d;
|
||||
#ifdef DEBUG
|
||||
// printf("Window requested desktop: %ld\n", _desktop);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue