- raise the window during maximization if the user clicked the maximize button, but otherwise don't
- two fixes here. 1) only raise window in maximize if the window is focused, 2) remap window on reparent event
This commit is contained in:
parent
2f65b6533c
commit
c04cb76409
1 changed files with 11 additions and 6 deletions
|
@ -1442,9 +1442,11 @@ void BlackboxWindow::maximize(unsigned int button) {
|
||||||
blackbox_attrib.flags &= ! (AttribMaxHoriz | AttribMaxVert);
|
blackbox_attrib.flags &= ! (AttribMaxHoriz | AttribMaxVert);
|
||||||
blackbox_attrib.attrib &= ! (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.
|
when a resize is begun, maximize(0) is called to clear any maximization
|
||||||
// so we do not need to call configure() because resizing will handle it
|
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)
|
if (!flags.resizing)
|
||||||
configure(blackbox_attrib.premax_x, blackbox_attrib.premax_y,
|
configure(blackbox_attrib.premax_x, blackbox_attrib.premax_y,
|
||||||
blackbox_attrib.premax_w, blackbox_attrib.premax_h);
|
blackbox_attrib.premax_w, blackbox_attrib.premax_h);
|
||||||
|
@ -1499,6 +1501,7 @@ void BlackboxWindow::maximize(unsigned int button) {
|
||||||
|
|
||||||
configure(frame.changing.x(), frame.changing.y(),
|
configure(frame.changing.x(), frame.changing.y(),
|
||||||
frame.changing.width(), frame.changing.height());
|
frame.changing.width(), frame.changing.height());
|
||||||
|
if (flags.focused)
|
||||||
screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this);
|
screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this);
|
||||||
redrawAllButtons();
|
redrawAllButtons();
|
||||||
setState(current_state);
|
setState(current_state);
|
||||||
|
@ -2640,8 +2643,10 @@ void BlackboxWindow::restore(bool remap) {
|
||||||
XSetWindowBorderWidth(blackbox->getXDisplay(), client.window, client.old_bw);
|
XSetWindowBorderWidth(blackbox->getXDisplay(), client.window, client.old_bw);
|
||||||
|
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
if (! XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window,
|
if (XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window,
|
||||||
ReparentNotify, &ev)) {
|
ReparentNotify, &ev)) {
|
||||||
|
remap = True;
|
||||||
|
} else {
|
||||||
// according to the ICCCM - if the client doesn't reparent to
|
// according to the ICCCM - if the client doesn't reparent to
|
||||||
// root, then we have to do it for them
|
// root, then we have to do it for them
|
||||||
XReparentWindow(blackbox->getXDisplay(), client.window,
|
XReparentWindow(blackbox->getXDisplay(), client.window,
|
||||||
|
|
Loading…
Reference in a new issue