summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-07-01 12:33:16 +0200
committerLiang Qi <liang.qi@qt.io>2016-07-01 13:21:29 +0200
commit200fdd96f0aae9d2060cf3b8cb491eda10d6d68f (patch)
tree80b3a1450c3fa8cbd44e07d82f6f5d3985a5902e /src/plugins/platforms
parentcb260c6c7f1ebd4b3fa5f86c3d98ec8ff0486095 (diff)
parente2665600c09358854bb0b29389cc873a2684f77b (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: configure configure.json Change-Id: Iba032d9a29c273da2585632bc6e22bbafb961808
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp9
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 063778a1de..c5cc2cd790 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2102,6 +2102,15 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *
// will make the comparison later.
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen());
+ // Send the synthetic expose event on resize only when the window is shrinked,
+ // because the "XCB_GRAVITY_NORTH_WEST" flag doesn't send it automatically.
+ if (!m_oldWindowSize.isEmpty()
+ && (actualGeometry.width() < m_oldWindowSize.width()
+ || actualGeometry.height() < m_oldWindowSize.height())) {
+ QWindowSystemInterface::handleExposeEvent(window(), QRegion(0, 0, actualGeometry.width(), actualGeometry.height()));
+ }
+ m_oldWindowSize = actualGeometry.size();
+
if (m_usingSyncProtocol && m_syncState == SyncReceived)
m_syncState = SyncAndConfigureReceived;
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index 9ad0153ca2..e7190b1733 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -256,6 +256,7 @@ protected:
mutable QMargins m_frameMargins;
QRegion m_exposeRegion;
+ QSize m_oldWindowSize;
xcb_visualid_t m_visualId;
int m_lastWindowStateEvent;