diff options
author | vaxerski <[email protected]> | 2022-05-20 15:02:51 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-05-20 15:02:51 +0200 |
commit | 5f620ee7ca2a94ccc4ae6caddd071da657ddf21e (patch) | |
tree | 880615686e6feb354745bbf3f4fe648ee8829b6a | |
parent | 2511d8981a0de6e1256662fd5cd4eec0adc2b64e (diff) | |
download | Hyprland-5f620ee7ca2a94ccc4ae6caddd071da657ddf21e.tar.gz Hyprland-5f620ee7ca2a94ccc4ae6caddd071da657ddf21e.zip |
fix fullscreen request loops
-rw-r--r-- | src/events/Windows.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index a6ae6c5d..89f359e6 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -282,7 +282,14 @@ void Events::listener_setTitleWindow(void* owner, void* data) { void Events::listener_fullscreenWindow(void* owner, void* data) { CWindow* PWINDOW = (CWindow*)owner; - g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW); + if (!PWINDOW->m_bIsX11) { + const auto REQUESTED = &PWINDOW->m_uSurface.xdg->toplevel->requested; + + if (REQUESTED->fullscreen != PWINDOW->m_bIsFullscreen) + g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW); + } else { + g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PWINDOW); + } Debug::log(LOG, "Window %x fullscreen to %i", PWINDOW, PWINDOW->m_bIsFullscreen); |