]> Dogcows Code - chaz/openbox/commitdiff
map to the highest possible desktop if a desktop too large is requested
authorDana Jansens <danakj@orodu.net>
Wed, 19 Feb 2003 09:35:13 +0000 (09:35 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 19 Feb 2003 09:35:13 +0000 (09:35 +0000)
src/client.cc

index e991639bb8d92db4e1dd4c1c647856cf9a136831..2e78cb7672ff439db78dce1eb6f0f3a219b332dd 100644 (file)
@@ -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
This page took 0.026943 seconds and 4 git commands to generate.