From 33d06fb0e5033412638edec5a8d78cbec844132a Mon Sep 17 00:00:00 2001 From: Person1873 <87143469+Person1873@users.noreply.github.com> Date: Fri, 14 Apr 2023 00:20:58 +1000 Subject: Add ability to split master when only 1 additional window (#2025) * fix: enable master split less than 2 windows added a config flag "master:allow_small_split" added config to minimum windows check. TODO: check that no bug added (remove all masters?) * IMPL:FIX: multiple master windows full width Implemented the ability to have multiple master windows filling the full monitor width in master mode. this is controlled by the config option master:allow_small_split (true/false) this defaults to false as it was the original behaviour before this patch * BUGFIX: corrected issue with blanks re: addmaster FIX 1: Treat ORIENTATION_CENTER the same as ORIENTATION_LEFT unless there are enough STACK_WINDOWS to fill both wings. FIX 2: enforced last window always set as master in MasterLayout::CHyperMasterLayout::calculateWorkspace(); FIX 3: fix 2, also fixed focus issues previously noted. * Changes requested by vaxerski changed how we access config variables (by reference not value) fixed a regression previously missed prior to requested changes. I had somehow broken the very functionality i meant to add. * added static keyword to config variables * removed superfluous static tags I made a mistake with making too many variables static. this made them only evaluate once per runtime breaking things majorly. My appologies. I haven't touched C++ in nearly 20 years. * remove annoying comment --------- Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com> --- src/config/ConfigManager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index c49114d2..b8dd3321 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -144,6 +144,7 @@ void CConfigManager::setDefaultVars() { configValues["master:no_gaps_when_only"].intValue = 0; configValues["master:orientation"].strValue = "left"; configValues["master:inherit_fullscreen"].intValue = 1; + configValues["master:allow_small_split"].intValue = 0; configValues["animations:enabled"].intValue = 1; -- cgit v1.2.3