diff options
author | David Edmundson <davidedmundson@kde.org> | 2023-06-15 12:14:45 +0100 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2023-08-31 05:59:39 +0000 |
commit | a46133a31dbb7dd42acc129af489adae0a335077 (patch) | |
tree | e3bf6d6be6617ec6f917f8cc8f8768b237589862 /src | |
parent | f6dd435fdb3086b2b2a9581d6da559510e8bfde1 (diff) |
client: Simplify toplevel exposure tracking
m_exposeRegion was originally there to track the expose updates
requested from the client in situations where the shell integration is
filtering those events, i.e when we're waiting for the first configure
event.
The fix at 7451faab740ec6294159be60d8a713f5e8070c09 explicitly sends an
expose event to the whole window when we get the actual first configure
event, at which point caching the expose region at the time of the
handleExpose check is unnecessary.
Motivation for cleanup is a pending change to support
xdg_toplevel.suspended where we need to unexpose at a shell level.
Change-Id: I56c3bab91453956046c1d7f92a4395c951c48fb3
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 9 | ||||
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h | 1 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index a161c7581..c9d1865c3 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -365,7 +365,6 @@ bool QWaylandXdgSurface::isExposed() const bool QWaylandXdgSurface::handleExpose(const QRegion ®ion) { if (!isExposed() && !region.isEmpty()) { - m_exposeRegion = region; return true; } return false; @@ -526,17 +525,13 @@ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) if (!m_configured) { // We have to do the initial applyConfigure() immediately, since that is the expose. applyConfigure(); - m_exposeRegion = QRegion(QRect(QPoint(), m_window->geometry().size())); + QRegion exposeRegion = QRegion(QRect(QPoint(), m_window->geometry().size())); + m_window->handleExpose(exposeRegion); } 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()) { - m_window->handleExpose(m_exposeRegion); - m_exposeRegion = QRegion(); - } } bool QWaylandXdgSurface::requestActivate() diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h index 951e8234f..ddfea2116 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h @@ -139,7 +139,6 @@ private: Toplevel *m_toplevel = nullptr; Popup *m_popup = nullptr; bool m_configured = false; - QRegion m_exposeRegion; uint m_pendingConfigureSerial = 0; uint m_appliedConfigureSerial = 0; QString m_activationToken; |