mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 19:25:59 +01:00
config: fix layout invalidation for keyword commands (#4826)
This commit is contained in:
parent
6f83856025
commit
e9528fc214
1 changed files with 3 additions and 7 deletions
|
@ -818,17 +818,13 @@ void CConfigManager::init() {
|
|||
}
|
||||
|
||||
std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std::string& VALUE) {
|
||||
int needsLayoutRecalc = COMMAND == "monitor"; // 0 - no, 1 - yes, 2 - maybe
|
||||
|
||||
const auto RET = m_pConfig->parseDynamic(COMMAND.c_str(), VALUE.c_str());
|
||||
|
||||
// invalidate layouts if they changed
|
||||
if (needsLayoutRecalc) {
|
||||
if (needsLayoutRecalc == 1 || COMMAND.contains("gaps_") || COMMAND.starts_with("dwindle:") || COMMAND.starts_with("master:")) {
|
||||
if (COMMAND == "monitor" || COMMAND.contains("gaps_") || COMMAND.starts_with("dwindle:") || COMMAND.starts_with("master:")) {
|
||||
for (auto& m : g_pCompositor->m_vMonitors)
|
||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->ID);
|
||||
}
|
||||
}
|
||||
|
||||
// Update window border colors
|
||||
g_pCompositor->updateAllWindowsAnimatedDecorationValues();
|
||||
|
|
Loading…
Reference in a new issue