summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2015-03-05 16:18:02 +0300
committerShawn Rutledge <shawn.rutledge@digia.com>2015-03-27 07:59:38 +0000
commitc0e4f24336cb0f0c21ad6c79e3da898d974ac1ad (patch)
tree6f3c3772b6e3876942214f2b50dd7f7c2940df13 /src/plugins
parent9f1f8aaa92cdd0a1a655bb7dc4fae200c805489d (diff)
xcb: Determine the window gravity just before the window is shown
It may change after the window has been created. Change-Id: Ib81a7ad7353b1909cc42684fc70d6b7d2556106f Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp8
1 files changed, 3 insertions, 5 deletions
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();