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.
This commit is contained in:
parent
641d85b14e
commit
8a64168a43
1 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue