summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp23
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h4
2 files changed, 24 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 5a8f90b7ad..f328c2f2f8 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -161,6 +161,8 @@ void QXcbWindow::create()
{
destroy();
+ m_deferredExpose = false;
+ m_configureNotifyPending = true;
m_windowState = Qt::WindowNoState;
Qt::WindowType type = window()->windowType();
@@ -1229,7 +1231,7 @@ void QXcbWindow::handleExposeEvent(const xcb_expose_event_t *event)
// if count is non-zero there are more expose events pending
if (event->count == 0) {
- QWindowSystemInterface::handleSynchronousExposeEvent(window(), m_exposeRegion);
+ QWindowSystemInterface::handleExposeEvent(window(), m_exposeRegion);
m_exposeRegion = QRegion();
}
}
@@ -1294,6 +1296,13 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *
QPlatformWindow::setGeometry(rect);
QWindowSystemInterface::handleGeometryChange(window(), rect);
+ m_configureNotifyPending = false;
+
+ if (m_deferredExpose) {
+ m_deferredExpose = false;
+ QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
+ }
+
m_dirtyFrameMargins = true;
#if XCB_USE_DRI2
@@ -1302,13 +1311,21 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *
#endif
}
+bool QXcbWindow::isExposed() const
+{
+ return m_mapped;
+}
+
void QXcbWindow::handleMapNotifyEvent(const xcb_map_notify_event_t *event)
{
if (event->window == m_window) {
m_mapped = true;
if (m_deferredActivation)
requestActivateWindow();
- QWindowSystemInterface::handleMapEvent(window());
+ if (m_configureNotifyPending)
+ m_deferredExpose = true;
+ else
+ QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
}
}
@@ -1316,7 +1333,7 @@ void QXcbWindow::handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event)
{
if (event->window == m_window) {
m_mapped = false;
- QWindowSystemInterface::handleUnmapEvent(window());
+ QWindowSystemInterface::handleExposeEvent(window(), QRegion());
}
}
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index c212095e98..37e0bdb8d3 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -72,6 +72,8 @@ public:
WId winId() const;
void setParent(const QPlatformWindow *window);
+ bool isExposed() const;
+
void setWindowTitle(const QString &title);
void raise();
void lower();
@@ -155,6 +157,8 @@ private:
bool m_mapped;
bool m_transparent;
bool m_deferredActivation;
+ bool m_deferredExpose;
+ bool m_configureNotifyPending;
xcb_window_t m_netWmUserTimeWindow;
QSurfaceFormat m_format;