summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorBalazs Domjan <domjan@gmail.com>2013-08-07 17:24:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-13 16:44:06 +0200
commit0819c48e1bba1dd447f100d2f4a80ce5a3351ea8 (patch)
tree73feee6250fdb0ba6f19cec8aa0692904dfe9da5 /src/plugins/platforms
parentdfde98db52452a8c4711b80793c679974aefeb94 (diff)
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>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 5006aab35b..028cd9ab72 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -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;
}