Fix QDialog position shift bug after resize.
On Linux (XCB), resizing a dialog shifts its position. The fix corrigates the geometry of the dialog to the right values. Task-number: QTBUG-32473 Change-Id: I6d38539a3ebc3b95eacc7f13a76f83fc9e4d821c Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
dfde98db52
commit
0819c48e1b
@ -1302,6 +1302,9 @@ QRect QXcbWindow::windowToWmGeometry(QRect r) const
|
||||
r.translate(m_frameMargins.left(), m_frameMargins.top());
|
||||
} else if (!frameInclusive && m_gravity == XCB_GRAVITY_NORTH_WEST) {
|
||||
r.translate(-m_frameMargins.left(), -m_frameMargins.top());
|
||||
} else if (!frameInclusive && m_gravity == XCB_GRAVITY_CENTER) {
|
||||
r.translate(-(m_frameMargins.left() - m_frameMargins.right())/2,
|
||||
-(m_frameMargins.top() - m_frameMargins.bottom())/2);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user