_urgent = false;
// not positioned unless specified
_positioned = false;
+ // nothing is disabled unless specified
+ _disabled_decorations = 0;
getArea();
getDesktop();
updateProtocols();
- // got the type, the mwmhints, and the protocols, so we're ready to set up
+ getGravity(); // get the attribute gravity
+ updateNormalHints(); // this may override the attribute gravity
+
+ // got the type, the mwmhints, the protocols, and the normal hints (min/max
+ // sizes), so we're ready to set up
// the decorations/functions
setupDecorAndFunctions();
- getGravity(); // get the attribute gravity
- updateNormalHints(); // this may override the attribute gravity
// also get the initial_state and set _iconic if we aren't "starting"
// when we're "starting" that means we should use whatever state was already
// on the window over the initial map state, because it was already mapped
_functions |= Func_Close;
}
- if (_min_size.x() > _max_size.x() || _min_size.y() > _max_size.y()) {
- _decorations &= ~Decor_Maximize;
+ if (!(_min_size.x() < _max_size.x() || _min_size.y() < _max_size.y())) {
+ _decorations &= ~(Decor_Maximize | Decor_Handle);
_functions &= ~(Func_Resize | Func_Maximize);
}
_decorations &= ~Decor_Close;
changeAllowedActions();
+
+ if (frame) {
+ frame->adjustSize(); // change the decors on the frame
+ frame->adjustPosition(); // with more/less decorations, we may need to be
+ // moved
+ }
}
_strut.right = data[1];
_strut.top = data[2];
_strut.bottom = data[3];
-
- openbox->screen(_screen)->updateStrut();
+
+ // updating here is pointless while we're being mapped cuz we're not in
+ // the screen's client list yet
+ if (frame)
+ openbox->screen(_screen)->updateStrut();
}
delete [] data;
getType();
calcLayer(); // type may have changed, so update the layer
setupDecorAndFunctions();
- frame->adjustSize(); // this updates the frame for any new decor settings
}
else if (e.atom == otk::Property::atoms.net_wm_name ||
e.atom == otk::Property::atoms.wm_name)
else if (e.atom == otk::Property::atoms.wm_protocols) {
updateProtocols();
setupDecorAndFunctions();
- frame->adjustSize(); // update the decorations
}
else if (e.atom == otk::Property::atoms.net_wm_strut)
updateStrut();
{
_disabled_decorations = flags;
setupDecorAndFunctions();
- if (frame)
- frame->adjustSize(); // change the decors on the frame
}