aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-08-16 21:30:53 +0200
committervaxerski <[email protected]>2022-08-16 21:30:53 +0200
commitc6de4ee4b76f6ad3e53f00e6e32e2be2dbe63c26 (patch)
treed16c7ae6d8a1466d239002655a2e34353e540016
parent317b6c430cdaeee82c7385b74a0f5aa2d7eecdbb (diff)
downloadHyprland-c6de4ee4b76f6ad3e53f00e6e32e2be2dbe63c26.tar.gz
Hyprland-c6de4ee4b76f6ad3e53f00e6e32e2be2dbe63c26.zip
more checks in fullscreen event
-rw-r--r--src/events/Windows.cpp3
-rw-r--r--src/layout/DwindleLayout.cpp7
2 files changed, 10 insertions, 0 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index bcb09381..660b08a2 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -477,6 +477,9 @@ void Events::listener_setTitleWindow(void* owner, void* data) {
void Events::listener_fullscreenWindow(void* owner, void* data) {
CWindow* PWINDOW = (CWindow*)owner;
+ if (!PWINDOW->m_bIsMapped || PWINDOW->m_bHidden)
+ return;
+
if (!PWINDOW->m_bIsX11) {
const auto REQUESTED = &PWINDOW->m_uSurface.xdg->toplevel->requested;
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp
index 13ee7774..04d0223f 100644
--- a/src/layout/DwindleLayout.cpp
+++ b/src/layout/DwindleLayout.cpp
@@ -487,6 +487,10 @@ void CHyprDwindleLayout::onWindowRemovedTiling(CWindow* pWindow) {
void CHyprDwindleLayout::recalculateMonitor(const int& monid) {
const auto PMONITOR = g_pCompositor->getMonitorFromID(monid);
+
+ if (!PMONITOR)
+ return; // ???
+
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
if (!PWORKSPACE)
@@ -512,6 +516,9 @@ void CHyprDwindleLayout::recalculateMonitor(const int& monid) {
// massive hack from the fullscreen func
const auto PFULLWINDOW = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
+ if (!PFULLWINDOW) // ????
+ PWORKSPACE->m_bHasFullscreenWindow = false;
+
SDwindleNodeData fakeNode;
fakeNode.pWindow = PFULLWINDOW;
fakeNode.position = PMONITOR->vecPosition + PMONITOR->vecReservedTopLeft;