diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-02-19 09:35:13 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-02-19 09:35:13 +0000 |
| commit | 2df4d8c7aaaa904cac084e0a41bd2219dc269e42 (patch) | |
| tree | 9401fdfb2488147f3a7275c3bdaf464279e36591 /src | |
| parent | fb1c1a81632bcf79be2808373941700b51a1d8ee (diff) | |
map to the highest possible desktop if a desktop too large is requested
Diffstat (limited to 'src')
| -rw-r--r-- | src/client.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client.cc b/src/client.cc index e991639b..2e78cb76 100644 --- a/src/client.cc +++ b/src/client.cc @@ -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 |
