summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-10-11 10:56:19 +0100
committerGitHub <noreply@github.com>2024-10-11 10:56:19 +0100
commitd655a10381f01212635f2eadd69e1f22930f8f06 (patch)
treef81bb1efb123d14455c9f06f77eb96c8f8101d3f /src/layout/MasterLayout.cpp
parentb65773bea9b912a41cfcbc789fb2e60a07e3d0c1 (diff)
config/layout: nuke no_gaps_when_only (#8072)
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index 04a6ea29..8fde960d 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -631,12 +631,11 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
PWINDOW->unsetWindowData(PRIORITY_LAYOUT);
PWINDOW->updateWindowData();
- static auto PNOGAPSWHENONLY = CConfigValue<Hyprlang::INT>("master:no_gaps_when_only");
- static auto PANIMATE = CConfigValue<Hyprlang::INT>("misc:animate_manual_resizes");
- static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in");
- static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_out");
- auto* PGAPSIN = (CCssGapData*)(PGAPSINDATA.ptr())->getData();
- auto* PGAPSOUT = (CCssGapData*)(PGAPSOUTDATA.ptr())->getData();
+ static auto PANIMATE = CConfigValue<Hyprlang::INT>("misc:animate_manual_resizes");
+ static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in");
+ static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_out");
+ auto* PGAPSIN = (CCssGapData*)(PGAPSINDATA.ptr())->getData();
+ auto* PGAPSOUT = (CCssGapData*)(PGAPSOUTDATA.ptr())->getData();
auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT);
@@ -649,25 +648,6 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
PWINDOW->m_vSize = pNode->size;
PWINDOW->m_vPosition = pNode->position;
- if (*PNOGAPSWHENONLY && !PWINDOW->onSpecialWorkspace() && (getNodesOnWorkspace(PWINDOW->workspaceID()) == 1 || PWINDOW->isEffectiveInternalFSMode(FSMODE_MAXIMIZED))) {
-
- PWINDOW->m_sWindowData.decorate = CWindowOverridableVar(true, PRIORITY_LAYOUT);
- PWINDOW->m_sWindowData.noBorder = CWindowOverridableVar(*PNOGAPSWHENONLY != 2, PRIORITY_LAYOUT);
- PWINDOW->m_sWindowData.noRounding = CWindowOverridableVar(true, PRIORITY_LAYOUT);
- PWINDOW->m_sWindowData.noShadow = CWindowOverridableVar(true, PRIORITY_LAYOUT);
-
- PWINDOW->updateWindowDecos();
-
- const auto RESERVED = PWINDOW->getFullWindowReservedArea();
-
- PWINDOW->m_vRealPosition = PWINDOW->m_vPosition + RESERVED.topLeft;
- PWINDOW->m_vRealSize = PWINDOW->m_vSize - (RESERVED.topLeft + RESERVED.bottomRight);
-
- g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.goal());
-
- return;
- }
-
PWINDOW->updateWindowDecos();
auto calcPos = PWINDOW->m_vPosition;