Skip to content

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

feat(bar): reposition bar window on changes to working area (instead of display setting changes)

Lars Berger6f2daa98876c
diff --git a/GlazeWM.Bar/MainWindow.xaml.cs b/GlazeWM.Bar/MainWindow.xaml.cs
index 91da2b43..006cdd2b 100644
--- a/GlazeWM.Bar/MainWindow.xaml.cs
+++ b/GlazeWM.Bar/MainWindow.xaml.cs
@@ -4,10 +4,10 @@ using System.Windows;
using System.Windows.Interop;
using System.Windows.Threading;
using GlazeWM.Domain.Monitors;
+using GlazeWM.Domain.Monitors.Events;
using GlazeWM.Domain.UserConfigs;
using GlazeWM.Infrastructure;
using GlazeWM.Infrastructure.Bussing;
-using GlazeWM.Infrastructure.WindowsApi.Events;
using Microsoft.Extensions.DependencyInjection;
using static GlazeWM.Infrastructure.WindowsApi.WindowsApiService;
@@ -42,8 +42,8 @@ namespace GlazeWM.Bar
HideFromTaskSwitcher(windowHandle);
PositionWindow(windowHandle);
- // Reposition window on changes to display settings.
- _bus.Events.Where(@event => @event is DisplaySettingsChangedEvent)
+ // Reposition window on changes to the monitor's working area.
+ _bus.Events.Where(@event => @event is WorkingAreaResizedEvent)
.Subscribe((@event) =>
{
_dispatcher.Invoke(() => PositionWindow(windowHandle));