xatom->setValue(client.window, XAtom::net_wm_visible_name, XAtom::utf8,
client.title);
-#define DEBUG_WITH_ID 1
#ifdef DEBUG_WITH_ID
// the 16 is the 8 chars of the debug text plus the number
char *tmp = new char[client.title.length() + 16];
XClearWindow(blackbox->getXDisplay(), frame.close_button);
BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
- screen->getWindowStyle()->b_pic_unfocus, 0, 2);
+ screen->getWindowStyle()->b_pic_unfocus);
XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
2, 2, (frame.button_w - 3), (frame.button_w - 3));
XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
Even though the window wants to be shown, if it is not on the current
workspace, then it isn't going to be shown right now.
*/
- if (blackbox_attrib.workspace != screen->getCurrentWorkspaceID() &&
+ if (! flags.stuck &&
+ blackbox_attrib.workspace != screen->getCurrentWorkspaceID() &&
blackbox_attrib.workspace < screen->getWorkspaceCount())
if (current_state == NormalState) current_state = WithdrawnState;
frame.margin.top + frame.margin.bottom);
/*
- if a position change ha been specified, then that position will be used
- instead of determining a position based on the window's gravity.
+ if a position change has been specified, then that position will be
+ used instead of determining a position based on the window's gravity.
*/
- if (cr->value_mask & (CWX | CWY)) {
+ if (! (cr->value_mask & (CWX | CWY))) {
Corner corner;
switch (client.win_gravity) {
case NorthEastGravity:
bool success = setInputFocus();
if (success) // if focus succeeded install the colormap
installColormap(True); // XXX: shouldnt we honour no install?
- }
- if (screen->doAutoRaise())
- timer->start();
+ /*
+ We only auto-raise when the window wasn't focused because otherwise
+ we run into problems with gtk+ drop-down lists. The window ends up
+ raising over the list.
+ */
+ if (screen->doAutoRaise())
+ timer->start();
+ }
}
}
base_height = (client.base_height) ? client.base_height :
client.min_height;
- // constrain
- if (dw < client.min_width) dw = client.min_width;
- if (dh < client.min_height) dh = client.min_height;
- if (dw > client.max_width) dw = client.max_width;
- if (dh > client.max_height) dh = client.max_height;
+ // constrain, but only if the min/max are being used. if they aren't, then
+ // this resize is going to be from a ConfigureRequest because the window
+ // isn't allowed to be resized by the user. And in that case, we don't want
+ // to limit what the app can do
+ if (client.max_width > client.min_width ||
+ client.max_height > client.min_height) {
+ if (dw < client.min_width) dw = client.min_width;
+ if (dh < client.min_height) dh = client.min_height;
+ if (dw > client.max_width) dw = client.max_width;
+ if (dh > client.max_height) dh = client.max_height;
+ }
assert(dw >= base_width && dh >= base_height);