diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-01 11:27:03 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-04-01 11:27:03 +0000 |
commit | 26a9783d55da551984b8c408faa837ff83df8c50 (patch) | |
tree | ad8ec0b16013fecbd6dc99bbf8999db4c6073b67 /src/plugins/platforms/xcb | |
parent | f53621af053f313eff7fa7b204b5cceff675cb64 (diff) | |
parent | ce9519593a0b3deb99d1dd2529770f7e9fffef92 (diff) |
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbbackingstore.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 06db4d83ac..c0f5477f82 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -157,7 +157,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI xcb_generic_error_t *error = NULL; if (shm_present) error = xcb_request_check(xcb_connection(), xcb_shm_attach_checked(xcb_connection(), m_shm_info.shmseg, m_shm_info.shmid, false)); - if (!shm_present || error) { + if (!shm_present || error || id == -1) { free(error); shmdt(m_shm_info.shmaddr); diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 34179a70a4..b06b41a77b 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -356,11 +356,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 @@ -782,6 +777,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(); |