fix maximize/fullscreen for windows with non-Northwest gravity
Mark Tiefenbruck mark@fluxbox.org
2 files changed,
4 insertions(+),
4 deletions(-)
M
src/FbWinFrame.cc
→
src/FbWinFrame.cc
@@ -504,7 +504,7 @@ clearAll();
} void FbWinFrame::applyState() { - applyDecorations(); + applyDecorations(false); const int head = m_screen.getHead(window()); int new_x = m_state.x, new_y = m_state.y;@@ -1445,7 +1445,7 @@ shape &= ~(FbTk::Shape::BOTTOMRIGHT|FbTk::Shape::BOTTOMLEFT);
return shape; } -void FbWinFrame::applyDecorations() { +void FbWinFrame::applyDecorations(bool do_move) { int grav_x=0, grav_y=0; // negate gravity gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw,@@ -1484,7 +1484,7 @@ gravityTranslate(grav_x, grav_y, sizeHints().win_gravity, m_active_orig_client_bw,
false); // if the location changes, shift it - if (grav_x != 0 || grav_y != 0) { + if (do_move && (grav_x != 0 || grav_y != 0)) { move(grav_x + x(), grav_y + y()); client_move = true; }
M
src/FbWinFrame.hh
→
src/FbWinFrame.hh
@@ -165,7 +165,7 @@ bool maximizing = false) const;
void displaySize(unsigned int width, unsigned int height) const; void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; } - void applyDecorations(); + void applyDecorations(bool do_move = true); void applyState(); // this function translates its arguments according to win_gravity