]> Dogcows Code - chaz/openbox/commitdiff
make docks and desktops always on all desktops
authorDana Jansens <danakj@orodu.net>
Thu, 23 Jan 2003 13:28:37 +0000 (13:28 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 23 Jan 2003 13:28:37 +0000 (13:28 +0000)
src/client.cc

index 604a2e5d5309c55686fd14677e6f06990e4ea762..39e47cc4f4e356bec0298888fd21655feeba920f 100644 (file)
@@ -72,9 +72,21 @@ Client::Client(int screen, Window window)
   updateClass();
   updateStrut();
 
+  // this makes sure that these windows:
+  // a) appear on all desktops
+  // b) don't start iconified
+  if (_type == Type_Dock || _type == Type_Desktop) {
+    _desktop = 0xffffffff;
+  }
+  
   // restores iconic state when we restart.
   // this will override the initial_state if that was set
   if (_desktop == ICONIC_DESKTOP) _iconic = true;
+
+  // set the desktop hint, to make sure that it always exists, and to reflect
+  // any changes we've made here
+  otk::Property::set(_window, otk::Property::atoms.net_wm_desktop,
+                     otk::Property::atoms.cardinal, (unsigned)_desktop);
   
   changeState();
 }
@@ -121,13 +133,9 @@ void Client::getDesktop()
   // defaults to the current desktop
   _desktop = openbox->screen(_screen)->desktop();
 
-  if (!otk::Property::get(_window, otk::Property::atoms.net_wm_desktop,
-                          otk::Property::atoms.cardinal,
-                          (long unsigned*)&_desktop)) {
-    // make sure the hint exists
-    otk::Property::set(_window, otk::Property::atoms.net_wm_desktop,
-                       otk::Property::atoms.cardinal, (unsigned)_desktop);
-  }
+  otk::Property::get(_window, otk::Property::atoms.net_wm_desktop,
+                     otk::Property::atoms.cardinal,
+                     (long unsigned*)&_desktop);
 }
 
 
This page took 0.025665 seconds and 4 git commands to generate.