From f3db1b172c6c61df7d5b8c960feccf3c19eb8e23 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 24 Mar 2025 23:57:23 +0000 Subject: [PATCH] decoration: bring back border_part_of_window fixes #9683, now under decoration: though --- src/config/ConfigDescriptions.hpp | 6 ++++++ src/config/ConfigManager.cpp | 1 + src/render/decorations/CHyprBorderDecoration.cpp | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp index 54223c1c..402780e0 100644 --- a/src/config/ConfigDescriptions.hpp +++ b/src/config/ConfigDescriptions.hpp @@ -247,6 +247,12 @@ inline static const std::vector CONFIG_OPTIONS = { .type = CONFIG_OPTION_STRING_LONG, .data = SConfigOptionDescription::SStringData{""}, //##TODO UNSET? }, + SConfigOptionDescription{ + .value = "decoration:border_part_of_window", + .description = "whether the border should be treated as a part of the window.", + .type = CONFIG_OPTION_BOOL, + .data = SConfigOptionDescription::SBoolData{true}, + }, /* * blur: diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 983681c9..ebbdb7c6 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -539,6 +539,7 @@ CConfigManager::CConfigManager() { registerConfigVar("decoration:dim_special", {0.2f}); registerConfigVar("decoration:dim_around", {0.4f}); registerConfigVar("decoration:screen_shader", {STRVAL_EMPTY}); + registerConfigVar("decoration:border_part_of_window", Hyprlang::INT{1}); registerConfigVar("dwindle:pseudotile", Hyprlang::INT{0}); registerConfigVar("dwindle:force_split", Hyprlang::INT{0}); diff --git a/src/render/decorations/CHyprBorderDecoration.cpp b/src/render/decorations/CHyprBorderDecoration.cpp index 0d07c2ea..7ff1ee10 100644 --- a/src/render/decorations/CHyprBorderDecoration.cpp +++ b/src/render/decorations/CHyprBorderDecoration.cpp @@ -147,7 +147,9 @@ eDecorationLayer CHyprBorderDecoration::getDecorationLayer() { } uint64_t CHyprBorderDecoration::getDecorationFlags() { - return !doesntWantBorders() ? DECORATION_PART_OF_MAIN_WINDOW : 0; + static auto PPARTOFWINDOW = CConfigValue("decoration:border_part_of_window"); + + return *PPARTOFWINDOW && !doesntWantBorders() ? DECORATION_PART_OF_MAIN_WINDOW : 0; } std::string CHyprBorderDecoration::getDisplayName() {