summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp12
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 56c5c4836f..bf882bdf84 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -1122,7 +1122,17 @@ QXcbEGLSurface *QXcbWindow::eglSurface() const
void QXcbWindow::handleExposeEvent(const xcb_expose_event_t *event)
{
QRect rect(event->x, event->y, event->width, event->height);
- QWindowSystemInterface::handleSynchronousExposeEvent(window(), rect);
+
+ if (m_exposeRegion.isEmpty())
+ m_exposeRegion = rect;
+ else
+ m_exposeRegion |= rect;
+
+ // if count is non-zero there are more expose events pending
+ if (event->count == 0) {
+ QWindowSystemInterface::handleSynchronousExposeEvent(window(), m_exposeRegion);
+ m_exposeRegion = QRegion();
+ }
}
void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *event)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index e864c14f0f..e70686cba0 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -156,6 +156,8 @@ private:
#if defined(XCB_USE_EGL)
mutable QXcbEGLSurface *m_eglSurface;
#endif
+
+ QRegion m_exposeRegion;
};
#endif