summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
authorthejch <66577496+thejch@users.noreply.github.com>2024-03-07 05:27:58 -0800
committerGitHub <noreply@github.com>2024-03-07 13:27:58 +0000
commit6c4e2489a0a153ac2a92744ecb2985280c97fc89 (patch)
treed0cf1513ab82696815565af197a90c956cdc261c /src/layout/MasterLayout.cpp
parentbf71026b8d31edc86a97222ef0fbec4972635cac (diff)
layout: Fix toggling fullscreen special workspace on different monitor (#5000)
* fix toggling fullscreen special ws on different monitor * add for dwindle * fix change regular workspace when special fullscreen
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index 4cff8bed..d266d816 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -296,6 +296,28 @@ void CHyprMasterLayout::recalculateMonitor(const int& monid) {
g_pHyprRenderer->damageMonitor(PMONITOR);
if (PMONITOR->specialWorkspaceID) {
+ const auto PSPECIALWS = g_pCompositor->getWorkspaceByID(PMONITOR->specialWorkspaceID);
+
+ if (PSPECIALWS->m_bHasFullscreenWindow) {
+ const auto PFULLWINDOW = g_pCompositor->getFullscreenWindowOnWorkspace(PSPECIALWS->m_iID);
+
+ if (PSPECIALWS->m_efFullscreenMode == FULLSCREEN_FULL) {
+ PFULLWINDOW->m_vRealPosition = PMONITOR->vecPosition;
+ PFULLWINDOW->m_vRealSize = PMONITOR->vecSize;
+ } else if (PSPECIALWS->m_efFullscreenMode == FULLSCREEN_MAXIMIZED) {
+ SMasterNodeData fakeNode;
+ fakeNode.pWindow = PFULLWINDOW;
+ fakeNode.position = PMONITOR->vecPosition + PMONITOR->vecReservedTopLeft;
+ fakeNode.size = PMONITOR->vecSize - PMONITOR->vecReservedTopLeft - PMONITOR->vecReservedBottomRight;
+ fakeNode.workspaceID = PSPECIALWS->m_iID;
+ PFULLWINDOW->m_vPosition = fakeNode.position;
+ PFULLWINDOW->m_vSize = fakeNode.size;
+ fakeNode.ignoreFullscreenChecks = true;
+
+ applyNodeDataToWindow(&fakeNode);
+ }
+ }
+
calculateWorkspace(PMONITOR->specialWorkspaceID);
}