From c0e4f24336cb0f0c21ad6c79e3da898d974ac1ad Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Thu, 5 Mar 2015 16:18:02 +0300 Subject: xcb: Determine the window gravity just before the window is shown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It may change after the window has been created. Change-Id: Ib81a7ad7353b1909cc42684fc70d6b7d2556106f Reviewed-by: Uli Schlachter Reviewed-by: Jørgen Lind --- src/plugins/platforms/xcb/qxcbwindow.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 233514a181..c0076a9977 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -308,11 +308,6 @@ void QXcbWindow::create() return; } - // Determine gravity from initial position. Do not change - // later as it will cause the window to move uncontrollably. - m_gravity = positionIncludesFrame(window()) ? - XCB_GRAVITY_NORTH_WEST : XCB_GRAVITY_STATIC; - const quint32 mask = XCB_CW_BACK_PIXMAP | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER | XCB_CW_EVENT_MASK; const quint32 values[] = { // XCB_CW_BACK_PIXMAP @@ -732,6 +727,9 @@ void QXcbWindow::show() xcb_set_wm_hints(xcb_connection(), m_window, &hints); + m_gravity = positionIncludesFrame(window()) ? + XCB_GRAVITY_NORTH_WEST : XCB_GRAVITY_STATIC; + // update WM_NORMAL_HINTS propagateSizeHints(); -- cgit v1.2.3