From ba03aaaa33af1f405b91e57aa49958547c5ed39f Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Wed, 3 Sep 2008 10:41:05 -0400 Subject: fix maximize/fullscreen for windows with non-Northwest gravity --- src/FbWinFrame.cc | 6 +++--- src/FbWinFrame.hh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 8617c1b..435f2fb 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -504,7 +504,7 @@ void FbWinFrame::setFocus(bool newvalue) { } 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 @@ int FbWinFrame::getShape() const { 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 @@ void FbWinFrame::applyDecorations() { 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; } diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 45953ba..fcbe11e 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh @@ -165,7 +165,7 @@ public: 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 -- cgit v0.11.2