long icccm_mask;
XSizeHints sizehint;
- const Rect& screen_area = screen->availableArea();
-
client.min_width = client.min_height =
client.width_inc = client.height_inc = 1;
client.base_width = client.base_height = 0;
+
+ /*
+ use the full screen, not the strut modified size. otherwise when the
+ availableArea changes max_width/height will be incorrect and lead to odd
+ rendering bugs.
+ */
+ const Rect& screen_area = screen->getRect();
client.max_width = screen_area.width();
+
client.max_height = screen_area.height();
client.min_aspect_x = client.min_aspect_y =
client.max_aspect_x = client.max_aspect_y = 1;
client.transient_for = 0;
Window trans_for;
- if (!XGetTransientForHint(blackbox->getXDisplay(), client.window,
- &trans_for)) {
+ if (! XGetTransientForHint(blackbox->getXDisplay(), client.window,
+ &trans_for)) {
// transient_for hint not set
return;
}
blackbox_attrib.flags &= ! (AttribMaxHoriz | AttribMaxVert);
blackbox_attrib.attrib &= ! (AttribMaxHoriz | AttribMaxVert);
- // when a resize is begun, maximize(0) is called to clear any maximization
- // flags currently set. Otherwise it still thinks it is maximized.
- // so we do not need to call configure() because resizing will handle it
- if (!flags.resizing)
+ /*
+ when a resize is begun, maximize(0) is called to clear any maximization
+ flags currently set. Otherwise it still thinks it is maximized.
+ so we do not need to call configure() because resizing will handle it
+ */
+ if (! flags.resizing)
configure(blackbox_attrib.premax_x, blackbox_attrib.premax_y,
blackbox_attrib.premax_w, blackbox_attrib.premax_h);
configure(frame.changing.x(), frame.changing.y(),
frame.changing.width(), frame.changing.height());
- screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this);
+ if (flags.focused)
+ screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this);
redrawAllButtons();
setState(current_state);
}
blackbox->getBlackboxAttributesAtom(),
&atom_return, &foo, &nitems, &ulfoo,
(unsigned char **) &net);
- if (ret != Success || !net || nitems != PropBlackboxAttributesElements)
+ if (ret != Success || ! net || nitems != PropBlackboxAttributesElements)
return;
if (net->flags & AttribShaded &&
void BlackboxWindow::motionNotifyEvent(XMotionEvent *me) {
- if (!flags.resizing && (me->state & Button1Mask) &&
+ if (! flags.resizing && (me->state & Button1Mask) &&
(functions & Func_Move) &&
(frame.title == me->window || frame.label == me->window ||
frame.handle == me->window || frame.window == me->window)) {
XSetWindowBorderWidth(blackbox->getXDisplay(), client.window, client.old_bw);
XEvent ev;
- if (! XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window,
- ReparentNotify, &ev)) {
+ if (XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window,
+ ReparentNotify, &ev)) {
+ remap = True;
+ } else {
// according to the ICCCM - if the client doesn't reparent to
// root, then we have to do it for them
XReparentWindow(blackbox->getXDisplay(), client.window,
if (decorations & Decor_Border) {
frame.border_w = screen->getBorderWidth();
- if (!isTransient())
+ if (! isTransient())
frame.mwm_border_w = screen->getFrameWidth();
else
frame.mwm_border_w = 0;