diff options
| author | jmanc3 <jman12316@live.com> | 2025-09-01 15:44:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-01 22:44:41 +0200 |
| commit | 8a64168a43f7d50810f428af0b34013f796ca2c8 (patch) | |
| tree | c58843c557272ebc8d750d4136f9f45ba78c85e2 /src/desktop/Window.cpp | |
| parent | 641d85b14e353bf450f2afaa5230093b8bf4d0e5 (diff) | |
window: treat maximize as toggle request (#11564)
Breaks the spec, but fixes a few issues due to how we always communicate to the apps that they are maximized in xdg_shell.
Diffstat (limited to 'src/desktop/Window.cpp')
| -rw-r--r-- | src/desktop/Window.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 03914581..3c952005 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1466,8 +1466,12 @@ void CWindow::onUpdateState() { } if (requestsMX.has_value() && !(m_suppressedEvents & SUPPRESS_MAXIMIZE)) { - if (m_isMapped) - g_pCompositor->changeWindowFullscreenModeClient(m_self.lock(), FSMODE_MAXIMIZED, requestsMX.value()); + if (m_isMapped) { + auto window = m_self.lock(); + auto state = sc<int8_t>(window->m_fullscreenState.client); + bool maximized = (state & sc<uint8_t>(FSMODE_MAXIMIZED)) != 0; + g_pCompositor->changeWindowFullscreenModeClient(window, FSMODE_MAXIMIZED, !maximized); + } } } |
