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()) {
+ if (!(_min_size.x() < _max_size.x() || _min_size.y() < _max_size.y())) {
_decorations &= ~(Decor_Maximize | Decor_Handle);
_functions &= ~(Func_Resize | Func_Maximize);
}
if (_disabled_decorations & Decor_Close)
_decorations &= ~Decor_Close;
+ // You can't shade without a titlebar
+ if (!(_decorations & Decor_Titlebar))
+ _functions &= ~Func_Shade;
+
changeAllowedActions();
if (frame) {
event.xconfigure.display = **otk::display;
event.xconfigure.event = _window;
event.xconfigure.window = _window;
- event.xconfigure.x = x;
- event.xconfigure.y = y;
+
+ // root window coords with border in mind
+ event.xconfigure.x = x - _border_width + frame->size().left;
+ event.xconfigure.y = y - _border_width + frame->size().top;
+
event.xconfigure.width = _area.width();
event.xconfigure.height = _area.height();
event.xconfigure.border_width = _border_width;
- event.xconfigure.above = frame->window();
+ event.xconfigure.above = frame->plate();
event.xconfigure.override_redirect = False;
XSendEvent(event.xconfigure.display, event.xconfigure.window, False,
StructureNotifyMask, &event);
+#if 0//def DEBUG
+ printf("Sent synthetic ConfigureNotify %d,%d %d,%d to 0x%lx\n",
+ event.xconfigure.x, event.xconfigure.y, event.xconfigure.width,
+ event.xconfigure.height, event.xconfigure.window);
+#endif
}
}