make docks and desktops always on all desktops

This commit is contained in:
Dana Jansens 2003-01-23 13:28:37 +00:00
parent ea902741e7
commit 8b4004ac68

View file

@ -72,10 +72,22 @@ Client::Client(int screen, Window window)
updateClass(); updateClass();
updateStrut(); 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. // restores iconic state when we restart.
// this will override the initial_state if that was set // this will override the initial_state if that was set
if (_desktop == ICONIC_DESKTOP) _iconic = true; 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(); changeState();
} }
@ -121,13 +133,9 @@ void Client::getDesktop()
// defaults to the current desktop // defaults to the current desktop
_desktop = openbox->screen(_screen)->desktop(); _desktop = openbox->screen(_screen)->desktop();
if (!otk::Property::get(_window, otk::Property::atoms.net_wm_desktop, otk::Property::get(_window, otk::Property::atoms.net_wm_desktop,
otk::Property::atoms.cardinal, otk::Property::atoms.cardinal,
(long unsigned*)&_desktop)) { (long unsigned*)&_desktop);
// make sure the hint exists
otk::Property::set(_window, otk::Property::atoms.net_wm_desktop,
otk::Property::atoms.cardinal, (unsigned)_desktop);
}
} }