Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

fix: undefined variable `_userConfigService` after merge (#223)

blam217c255b40c4
diff --git a/GlazeWM.Bar/BarViewModel.cs b/GlazeWM.Bar/BarViewModel.cs
index 68034044..17a894c2 100644
--- a/GlazeWM.Bar/BarViewModel.cs
+++ b/GlazeWM.Bar/BarViewModel.cs
@@ -58,7 +58,7 @@ namespace GlazeWM.Bar
public List<ComponentViewModel> ComponentsCenter =>
InsertComponentSeparator(
- CreateComponentViewModels(BarConfig.ComponentsRight),
+ CreateComponentViewModels(BarConfig.ComponentsCenter),
_componentSeparatorCenter);
public List<ComponentViewModel> ComponentsRight =>
diff --git a/GlazeWM.Bar/MainWindow.xaml.cs b/GlazeWM.Bar/MainWindow.xaml.cs
index 4227d2f3..d625fccc 100644
--- a/GlazeWM.Bar/MainWindow.xaml.cs
+++ b/GlazeWM.Bar/MainWindow.xaml.cs
@@ -70,9 +70,8 @@ namespace GlazeWM.Bar
? _monitor.Height - scaledBarHeight
: 0;
- var barConfig = _userConfigService.GetBarConfigForMonitor(_monitor);
- var floatBarOffsetX = UnitsHelper.TrimUnits(barConfig.OffsetX);
- var floatBarOffsetY = UnitsHelper.TrimUnits(barConfig.OffsetY);
+ var floatBarOffsetX = UnitsHelper.TrimUnits(_barViewModel.BarConfig.OffsetX);
+ var floatBarOffsetY = UnitsHelper.TrimUnits(_barViewModel.BarConfig.OffsetY);
// The first move puts it on the correct monitor, which triggers WM_DPICHANGED.
MoveWindow(