summaryrefslogtreecommitdiffstats
path: root/src/plugins/shellintegration/xdg-shell-v6
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell-v6')
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp19
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h2
2 files changed, 17 insertions, 4 deletions
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
index 474a2a3ea..05c86e733 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
@@ -261,9 +261,14 @@ void QWaylandXdgSurfaceV6::setAppId(const QString &appId)
m_toplevel->set_app_id(appId);
}
+bool QWaylandXdgSurfaceV6::isExposed() const
+{
+ return m_configured || m_pendingConfigureSerial;
+}
+
bool QWaylandXdgSurfaceV6::handleExpose(const QRegion &region)
{
- if (!m_configured && !region.isEmpty()) {
+ if (!isExposed() && !region.isEmpty()) {
m_exposeRegion = region;
return true;
}
@@ -336,10 +341,18 @@ void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice
void QWaylandXdgSurfaceV6::zxdg_surface_v6_configure(uint32_t serial)
{
- m_window->applyConfigureWhenPossible();
m_pendingConfigureSerial = serial;
+ if (!m_configured) {
+ // We have to do the initial applyConfigure() immediately, since that is the expose.
+ applyConfigure();
+ } else {
+ // Later configures are probably resizes, so we have to queue them up for a time when we
+ // are not painting to the window.
+ m_window->applyConfigureWhenPossible();
+ }
+
if (!m_exposeRegion.isEmpty()) {
- QWindowSystemInterface::handleExposeEvent(m_window->window(), m_exposeRegion);
+ m_window->handleExpose(m_exposeRegion);
m_exposeRegion = QRegion();
}
}
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
index c88d111d2..d1dacd560 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
@@ -82,7 +82,7 @@ public:
void setTitle(const QString &title) override;
void setAppId(const QString &appId) override;
- bool isExposed() const override { return m_configured; }
+ bool isExposed() const override;
bool handleExpose(const QRegion &) override;
bool handlesActiveState() const { return m_toplevel; }
void applyConfigure() override;