diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-23 13:28:37 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-23 13:28:37 +0000 |
| commit | 8b4004ac68f9a3433e657c5903c064ba37fa6f87 (patch) | |
| tree | 59b590836eed3ba61996ccd6d7243b078dc87049 /src/client.cc | |
| parent | ea902741e738ecf5cb7cb7dd61fc6488a4b64a1f (diff) | |
make docks and desktops always on all desktops
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/client.cc b/src/client.cc index 604a2e5d..39e47cc4 100644 --- a/src/client.cc +++ b/src/client.cc @@ -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); } |
