diff options
author | David Edmundson <davidedmundson@kde.org> | 2023-11-16 15:01:50 +0000 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-12-11 16:19:59 +0000 |
commit | aa73e840ce300ee228f50c4497622ce6168e43d1 (patch) | |
tree | 690e28a80f4a5e971021a258816ec1af6da46e2d /src | |
parent | 499abc747185f9faae11f2a6bb198066cfc7e4d9 (diff) |
client: If the window minimized state is requested do not forward other states
In QWindowPrivate::effectiveState if the minimize flag is requested all
other states are cleared. This makes sense for the internal
representation, but we do not want to send the unset maximised state
across the wire.
Fixes: QTBUG-119136
Change-Id: I9b758c67ce11420b421a295fe3e65b68bf546027
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 0afaafef3916de86abaf5204c8b8350697ac15e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9eb71d709e045222c3270ea3e7f0c4134525322f)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 5c91c69e1..2ff84e636 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -172,6 +172,15 @@ void QWaylandXdgSurface::Toplevel::requestWindowStates(Qt::WindowStates states) // Re-send what's different from the applied state Qt::WindowStates changedStates = m_applied.states ^ states; + // Minimized state is not reported by the protocol, so always send it + if (states & Qt::WindowMinimized) { + set_minimized(); + m_xdgSurface->window()->handleWindowStatesChanged(states & ~Qt::WindowMinimized); + // The internal window state whilst minimized is not maximised or fullscreen, but we don't want to + // update the compositors cached version of this state + return; + } + if (changedStates & Qt::WindowMaximized) { if (states & Qt::WindowMaximized) set_maximized(); @@ -189,11 +198,7 @@ void QWaylandXdgSurface::Toplevel::requestWindowStates(Qt::WindowStates states) unset_fullscreen(); } - // Minimized state is not reported by the protocol, so always send it - if (states & Qt::WindowMinimized) { - set_minimized(); - m_xdgSurface->window()->handleWindowStatesChanged(states & ~Qt::WindowMinimized); - } + } QtWayland::xdg_toplevel::resize_edge QWaylandXdgSurface::Toplevel::convertToResizeEdges(Qt::Edges edges) |