aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-20 15:02:51 +0200
committervaxerski <[email protected]>2022-05-20 15:02:51 +0200
commit5f620ee7ca2a94ccc4ae6caddd071da657ddf21e (patch)
tree880615686e6feb354745bbf3f4fe648ee8829b6a
parent2511d8981a0de6e1256662fd5cd4eec0adc2b64e (diff)
downloadHyprland-5f620ee7ca2a94ccc4ae6caddd071da657ddf21e.tar.gz
Hyprland-5f620ee7ca2a94ccc4ae6caddd071da657ddf21e.zip
fix fullscreen request loops
-rw-r--r--src/events/Windows.cpp9
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);