fix maximize/fullscreen for windows with non-Northwest gravity
This commit is contained in:
parent
60a4c7d9f6
commit
ba03aaaa33
2 changed files with 4 additions and 4 deletions
|
@ -504,7 +504,7 @@ void FbWinFrame::setFocus(bool newvalue) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbWinFrame::applyState() {
|
void FbWinFrame::applyState() {
|
||||||
applyDecorations();
|
applyDecorations(false);
|
||||||
|
|
||||||
const int head = m_screen.getHead(window());
|
const int head = m_screen.getHead(window());
|
||||||
int new_x = m_state.x, new_y = m_state.y;
|
int new_x = m_state.x, new_y = m_state.y;
|
||||||
|
@ -1445,7 +1445,7 @@ int FbWinFrame::getShape() const {
|
||||||
return shape;
|
return shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbWinFrame::applyDecorations() {
|
void FbWinFrame::applyDecorations(bool do_move) {
|
||||||
int grav_x=0, grav_y=0;
|
int grav_x=0, grav_y=0;
|
||||||
// negate gravity
|
// negate gravity
|
||||||
gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw,
|
gravityTranslate(grav_x, grav_y, -sizeHints().win_gravity, m_active_orig_client_bw,
|
||||||
|
@ -1484,7 +1484,7 @@ void FbWinFrame::applyDecorations() {
|
||||||
false);
|
false);
|
||||||
|
|
||||||
// if the location changes, shift it
|
// 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());
|
move(grav_x + x(), grav_y + y());
|
||||||
client_move = true;
|
client_move = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ public:
|
||||||
void displaySize(unsigned int width, unsigned int height) const;
|
void displaySize(unsigned int width, unsigned int height) const;
|
||||||
|
|
||||||
void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; }
|
void setDecorationMask(unsigned int mask) { m_state.deco_mask = mask; }
|
||||||
void applyDecorations();
|
void applyDecorations(bool do_move = true);
|
||||||
void applyState();
|
void applyState();
|
||||||
|
|
||||||
// this function translates its arguments according to win_gravity
|
// this function translates its arguments according to win_gravity
|
||||||
|
|
Loading…
Reference in a new issue