mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-25 10:49:49 +01:00
fix bar offset oops
This commit is contained in:
parent
962819b049
commit
380ee051c9
2 changed files with 6 additions and 1 deletions
|
@ -384,6 +384,11 @@ void ConfigManager::loadConfigLoadVars() {
|
|||
configValues["bar:height"].intValue = 15;
|
||||
}
|
||||
|
||||
if (configValues["bar:monitor"].intValue > g_pWindowManager->monitors.size()) {
|
||||
configValues["bar:monitor"].intValue = 0;
|
||||
Debug::log(ERR, "Incorrect value in MonitorID for the bar. Setting to 0.");
|
||||
}
|
||||
|
||||
g_pWindowManager->statusBar->setup(configValues["bar:monitor"].intValue);
|
||||
} else if (g_pWindowManager->statusBar) {
|
||||
g_pWindowManager->statusBar->destroy();
|
||||
|
|
|
@ -680,7 +680,7 @@ void CWindowManager::setEffectiveSizePosUsingConfig(CWindow* pWindow) {
|
|||
return;
|
||||
|
||||
const auto MONITOR = getMonitorFromWindow(pWindow);
|
||||
const auto BARHEIGHT = (MONITOR->ID == pWindow->getMonitor() ? (ConfigManager::getInt("bar:enabled") == 1 ? ConfigManager::getInt("bar:height") : ConfigManager::parseError == "" ? 0 : ConfigManager::getInt("bar:height")) : 0);
|
||||
const auto BARHEIGHT = (MONITOR->ID == ConfigManager::getInt("bar:monitor") ? (ConfigManager::getInt("bar:enabled") == 1 ? ConfigManager::getInt("bar:height") : ConfigManager::parseError == "" ? 0 : ConfigManager::getInt("bar:height")) : 0);
|
||||
|
||||
|
||||
// set some flags.
|
||||
|
|
Loading…
Reference in a new issue