// update EVERYTHING the first time!!
- // we default to NormalState, visible
+ // defaults
_wmstate = NormalState;
- // start unfocused
_focused = false;
- // not a transient by default of course
_transient_for = 0;
- // pick a layer to start from
_layer = Layer_Normal;
- // default to not urgent
_urgent = false;
- // not positioned unless specified
_positioned = false;
- // nothing is disabled unless specified
_disabled_decorations = 0;
- // no modal children until they set themselves
_modal_child = 0;
+ _group = None;
+ _desktop = 0;
getArea();
getDesktop();
+ getState(); // do this before updateTransientFor! (for _modal)
+ getShaped();
updateTransientFor();
getMwmHints();
getType(); // this can change the mwmhints for special cases
- getState();
- getShaped();
-
updateProtocols();
getGravity(); // get the attribute gravity
_transients.front()->_transient_for = 0;
_transients.pop_front();
}
-
+
// clean up parents reference to this
- if (_modal)
- setModal(false);
if (_transient_for)
_transient_for->_transients.remove(this); // remove from old parent
void Client::setModal(bool modal)
{
+ if (modal == _modal) return;
+
if (modal) {
Client *c = this;
while (c->_transient_for) {
}
+void Client::installColormap(bool install) const
+{
+ XWindowAttributes wa;
+ if (XGetWindowAttributes(**otk::display, _window, &wa)) {
+ printf("%snstalling Window Colormap 0x%lx!\n", install ? "I" : "Uni", _window);
+ if (install)
+ XInstallColormap(**otk::display, wa.colormap);
+ else
+ XUninstallColormap(**otk::display, wa.colormap);
+ }
+}
+
+
bool Client::focus()
{
// if we have a modal child, then focus it, not us