summaryrefslogtreecommitdiff
path: root/src/layout/DwindleLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
-rw-r--r--src/layout/DwindleLayout.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp
index c356c8cc..c1bd0996 100644
--- a/src/layout/DwindleLayout.cpp
+++ b/src/layout/DwindleLayout.cpp
@@ -217,7 +217,7 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) {
OPENINGON = getFirstNodeOnWorkspace(PMONITOR->activeWorkspace);
} else
- OPENINGON = getFirstNodeOnWorkspace(PMONITOR->activeWorkspace);
+ OPENINGON = getFirstNodeOnWorkspace(pWindow->m_iWorkspaceID);
Debug::log(LOG, "OPENINGON: %x, Workspace: %i, Monitor: %i", OPENINGON, PNODE->workspaceID, PMONITOR->ID);
@@ -548,7 +548,7 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree
pWindow->m_bIsFullscreen = on;
PWORKSPACE->m_bHasFullscreenWindow = !PWORKSPACE->m_bHasFullscreenWindow;
- g_pEventManager->postEvent(SHyprIPCEvent("fullscreen", std::to_string((int)on)));
+ g_pEventManager->postEvent(SHyprIPCEvent{"fullscreen", std::to_string((int)on)});
if (!pWindow->m_bIsFullscreen) {
// if it got its fullscreen disabled, set back its node if it had one
@@ -864,3 +864,16 @@ void CHyprDwindleLayout::toggleSplit(CWindow* pWindow) {
std::string CHyprDwindleLayout::getLayoutName() {
return "dwindle";
}
+
+void CHyprDwindleLayout::onEnable() {
+ for (auto& w : g_pCompositor->m_vWindows) {
+ if (w->m_bIsFloating || !w->m_bMappedX11 || !w->m_bIsMapped || w->m_bHidden)
+ continue;
+
+ onWindowCreatedTiling(w.get());
+ }
+}
+
+void CHyprDwindleLayout::onDisable() {
+ m_lDwindleNodesData.clear();
+} \ No newline at end of file