diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-09-03 14:41:05 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-09-03 14:41:05 (GMT) |
commit | ba03aaaa33af1f405b91e57aa49958547c5ed39f (patch) | |
tree | d149540f17b04e793ed95650723b256c454c6372 /src | |
parent | 60a4c7d9f6a0fc997e11898f9042977922026052 (diff) | |
download | fluxbox-ba03aaaa33af1f405b91e57aa49958547c5ed39f.zip fluxbox-ba03aaaa33af1f405b91e57aa49958547c5ed39f.tar.bz2 |
fix maximize/fullscreen for windows with non-Northwest gravity
Diffstat (limited to 'src')
-rw-r--r-- | src/FbWinFrame.cc | 6 | ||||
-rw-r--r-- | 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) { | |||
504 | } | 504 | } |
505 | 505 | ||
506 | void FbWinFrame::applyState() { | 506 | void FbWinFrame::applyState() { |
507 | applyDecorations(); | 507 | applyDecorations(false); |
508 | 508 | ||
509 | const int head = m_screen.getHead(window()); | 509 | const int head = m_screen.getHead(window()); |
510 | int new_x = m_state.x, new_y = m_state.y; | 510 | int new_x = m_state.x, new_y = m_state.y; |
@@ -1445,7 +1445,7 @@ int FbWinFrame::getShape() const { | |||
1445 | return shape; | 1445 | return shape; |
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | void FbWinFrame::applyDecorations() { | 1448 | void FbWinFrame::applyDecorations(bool do_move) { |
1449 | int grav_x=0, grav_y=0; | 1449 | int grav_x=0, grav_y=0; |
1450 | // negate gravity | 1450 | // negate gravity |
1451 | gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw, | 1451 | gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw, |
@@ -1484,7 +1484,7 @@ void FbWinFrame::applyDecorations() { | |||
1484 | false); | 1484 | false); |
1485 | 1485 | ||
1486 | // if the location changes, shift it | 1486 | // if the location changes, shift it |
1487 | if (grav_x != 0 || grav_y != 0) { | 1487 | if (do_move && (grav_x != 0 || grav_y != 0)) { |
1488 | move(grav_x + x(), grav_y + y()); | 1488 | move(grav_x + x(), grav_y + y()); |
1489 | client_move = true; | 1489 | client_move = true; |
1490 | } | 1490 | } |
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: | |||
165 | void displaySize(unsigned int width, unsigned int height) const; | 165 | void displaySize(unsigned int width, unsigned int height) const; |
166 | 166 | ||
167 | void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; } | 167 | void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; } |
168 | void applyDecorations(); | 168 | void applyDecorations(bool do_move = true); |
169 | void applyState(); | 169 | void applyState(); |
170 | 170 | ||
171 | // this function translates its arguments according to win_gravity | 171 | // this function translates its arguments according to win_gravity |