From 26ddb586acd49834c7cffac781ce504ec78635cc Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 9 Sep 2013 13:10:37 +0200 Subject: xcb: QWindow never uses XCB_GRAVITY_CENTER Center gravity doesn't mean center the window, it only affects the method of converting between internal window bounds and decorated bounds. So wanting to have each dialog centered w.r.t. its transient parent is not a reason for using center gravity. Instead it caused the bug that when you resize a QMessageBox by clicking the Show Details button, it jumps downwards on the screen. Task-number: QTBUG-32473 Change-Id: I3fabf3caa1e4d10fd4f7508e297f73efe5cc51b6 Reviewed-by: Gunnar Sletta --- src/plugins/platforms/xcb/qxcbwindow.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 028cd9ab72..37b96fc391 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -646,7 +646,6 @@ void QXcbWindow::show() if (!transientXcbParent) transientXcbParent = static_cast(screen())->clientLeader(); if (transientXcbParent) { // ICCCM 4.1.2.6 - m_gravity = XCB_GRAVITY_CENTER; Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, 1, &transientXcbParent)); @@ -1302,9 +1301,6 @@ 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; } -- cgit v1.2.3