GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
refactor(infra): move out events under `WindowsApi` dir to `Common`
Lars Berger7b30fdbfb3ce
diff --git a/GlazeWM.Bootstrapper/Startup.cs b/GlazeWM.Bootstrapper/Startup.csindex b81a1ebb..eec93780 100644--- a/GlazeWM.Bootstrapper/Startup.cs+++ b/GlazeWM.Bootstrapper/Startup.cs@@ -3,9 +3,9 @@ using GlazeWM.Domain.Common.Commands;using GlazeWM.Domain.UserConfigs.Commands;using GlazeWM.Domain.Windows.Commands;using GlazeWM.Infrastructure.Bussing;+using GlazeWM.Infrastructure.Common.Events;using GlazeWM.Infrastructure.Exceptions;using GlazeWM.Infrastructure.WindowsApi;-using GlazeWM.Infrastructure.WindowsApi.Events;using System;using System.Collections.Generic;using System.Linq;diff --git a/GlazeWM.Domain/DependencyInjection.cs b/GlazeWM.Domain/DependencyInjection.csindex 6086aed8..5dfa94ac 100644--- a/GlazeWM.Domain/DependencyInjection.cs+++ b/GlazeWM.Domain/DependencyInjection.cs@@ -18,7 +18,7 @@ using GlazeWM.Domain.Workspaces;using GlazeWM.Domain.Workspaces.CommandHandlers;using GlazeWM.Domain.Workspaces.Commands;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;using Microsoft.Extensions.DependencyInjection;namespace GlazeWM.Domaindiff --git a/GlazeWM.Domain/Monitors/EventHandlers/DisplaySettingsChangedHandler.cs b/GlazeWM.Domain/Monitors/EventHandlers/DisplaySettingsChangedHandler.csindex c801a8f1..fa87075f 100644--- a/GlazeWM.Domain/Monitors/EventHandlers/DisplaySettingsChangedHandler.cs+++ b/GlazeWM.Domain/Monitors/EventHandlers/DisplaySettingsChangedHandler.cs@@ -1,6 +1,6 @@using GlazeWM.Domain.Monitors.Commands;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;namespace GlazeWM.Domain.Monitors.EventHandlers{diff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowDestroyedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowDestroyedHandler.csindex 17bd1bdf..9cf89f64 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowDestroyedHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowDestroyedHandler.cs@@ -4,7 +4,7 @@ using GlazeWM.Domain.Containers.Commands;using GlazeWM.Domain.Monitors.Commands;using GlazeWM.Domain.Windows.Commands;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;using Microsoft.Extensions.Logging;namespace GlazeWM.Domain.Windows.EventHandlersdiff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.csindex e7c04d77..bbaad085 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowFocusedHandler.cs@@ -6,7 +6,7 @@ using GlazeWM.Domain.Containers.Events;using GlazeWM.Domain.Windows.Commands;using GlazeWM.Domain.Workspaces;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;using Microsoft.Extensions.Logging;using static GlazeWM.Infrastructure.WindowsApi.WindowsApiService;diff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowHiddenHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowHiddenHandler.csindex 0d2e15f5..00c6c74f 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowHiddenHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowHiddenHandler.cs@@ -4,7 +4,7 @@ using GlazeWM.Domain.Containers.Commands;using GlazeWM.Domain.Monitors.Commands;using GlazeWM.Domain.Windows.Commands;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;using Microsoft.Extensions.Logging;namespace GlazeWM.Domain.Windows.EventHandlersdiff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowLocationChangedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowLocationChangedHandler.csindex faa30879..23213b8b 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowLocationChangedHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowLocationChangedHandler.cs@@ -1,6 +1,6 @@using GlazeWM.Domain.Monitors.Commands;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;namespace GlazeWM.Domain.Windows.EventHandlers{diff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizeEndedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizeEndedHandler.csindex 4fa68176..9247c90c 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizeEndedHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizeEndedHandler.cs@@ -5,7 +5,7 @@ using GlazeWM.Domain.Containers;using GlazeWM.Domain.Containers.Commands;using GlazeWM.Domain.Workspaces;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;using Microsoft.Extensions.Logging;namespace GlazeWM.Domain.Windows.EventHandlersdiff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizedHandler.csindex 3647b789..1a004b14 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizedHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowMinimizedHandler.cs@@ -5,7 +5,7 @@ using GlazeWM.Domain.Containers.Commands;using GlazeWM.Domain.Windows.Commands;using GlazeWM.Domain.Workspaces;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;using Microsoft.Extensions.Logging;using static GlazeWM.Infrastructure.WindowsApi.WindowsApiService;diff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.csindex 390008c7..03706e4f 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowMovedOrResizedHandler.cs@@ -8,8 +8,8 @@ using GlazeWM.Domain.Monitors;using GlazeWM.Domain.Windows.Commands;using GlazeWM.Domain.Workspaces;using GlazeWM.Infrastructure.Bussing;+using GlazeWM.Infrastructure.Common.Events;using GlazeWM.Infrastructure.WindowsApi;-using GlazeWM.Infrastructure.WindowsApi.Events;using Microsoft.Extensions.Logging;namespace GlazeWM.Domain.Windows.EventHandlersdiff --git a/GlazeWM.Domain/Windows/EventHandlers/WindowShownHandler.cs b/GlazeWM.Domain/Windows/EventHandlers/WindowShownHandler.csindex 0b446ece..342993f0 100644--- a/GlazeWM.Domain/Windows/EventHandlers/WindowShownHandler.cs+++ b/GlazeWM.Domain/Windows/EventHandlers/WindowShownHandler.cs@@ -2,7 +2,7 @@using GlazeWM.Domain.Monitors.Commands;using GlazeWM.Domain.Windows.Commands;using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;namespace GlazeWM.Domain.Windows.EventHandlers{diff --git a/GlazeWM.Infrastructure/Common/CommandHandlers/ExitApplicationHandler.cs b/GlazeWM.Infrastructure/Common/CommandHandlers/ExitApplicationHandler.csindex 9f0288eb..a0ad215d 100644--- a/GlazeWM.Infrastructure/Common/CommandHandlers/ExitApplicationHandler.cs+++ b/GlazeWM.Infrastructure/Common/CommandHandlers/ExitApplicationHandler.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;using GlazeWM.Infrastructure.Common.Commands;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;namespace GlazeWM.Infrastructure.Common.CommandHandlers{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/ApplicationExitingEvent.cs b/GlazeWM.Infrastructure/Common/Events/ApplicationExitingEvent.cssimilarity index 65%rename from GlazeWM.Infrastructure/WindowsApi/Events/ApplicationExitingEvent.csrename to GlazeWM.Infrastructure/Common/Events/ApplicationExitingEvent.csindex 4de34d0f..a83a4655 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/ApplicationExitingEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/ApplicationExitingEvent.cs@@ -1,6 +1,6 @@using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class ApplicationExitingEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/DisplaySettingsChangedEvent.cs b/GlazeWM.Infrastructure/Common/Events/DisplaySettingsChangedEvent.cssimilarity index 66%rename from GlazeWM.Infrastructure/WindowsApi/Events/DisplaySettingsChangedEvent.csrename to GlazeWM.Infrastructure/Common/Events/DisplaySettingsChangedEvent.csindex e61e3d10..06f73a79 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/DisplaySettingsChangedEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/DisplaySettingsChangedEvent.cs@@ -1,6 +1,6 @@using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class DisplaySettingsChangedEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowDestroyedEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowDestroyedEvent.cssimilarity index 83%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowDestroyedEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowDestroyedEvent.csindex 5a7ec23a..62db68bd 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowDestroyedEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowDestroyedEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowDestroyedEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowFocusedEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowFocusedEvent.cssimilarity index 83%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowFocusedEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowFocusedEvent.csindex 3e1c3dea..c396f0b9 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowFocusedEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowFocusedEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowFocusedEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowHiddenEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowHiddenEvent.cssimilarity index 82%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowHiddenEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowHiddenEvent.csindex 888118fb..b87bc35d 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowHiddenEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowHiddenEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowHiddenEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowLocationChangedEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowLocationChangedEvent.cssimilarity index 83%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowLocationChangedEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowLocationChangedEvent.csindex df9b2cfe..f5fb6496 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowLocationChangedEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowLocationChangedEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowLocationChangedEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowMinimizeEndedEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowMinimizeEndedEvent.cssimilarity index 83%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowMinimizeEndedEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowMinimizeEndedEvent.csindex 2b581daf..34ec93a6 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowMinimizeEndedEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowMinimizeEndedEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowMinimizeEndedEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowMinimizedEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowMinimizedEvent.cssimilarity index 83%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowMinimizedEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowMinimizedEvent.csindex ff06f156..e8488ea9 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowMinimizedEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowMinimizedEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowMinimizedEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowMovedOrResizedEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowMovedOrResizedEvent.cssimilarity index 83%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowMovedOrResizedEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowMovedOrResizedEvent.csindex 7258b238..2ef9f5f2 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowMovedOrResizedEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowMovedOrResizedEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowMovedOrResizedEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/Events/WindowShownEvent.cs b/GlazeWM.Infrastructure/Common/Events/WindowShownEvent.cssimilarity index 82%rename from GlazeWM.Infrastructure/WindowsApi/Events/WindowShownEvent.csrename to GlazeWM.Infrastructure/Common/Events/WindowShownEvent.csindex 5bb884a5..6c2fccfa 100644--- a/GlazeWM.Infrastructure/WindowsApi/Events/WindowShownEvent.cs+++ b/GlazeWM.Infrastructure/Common/Events/WindowShownEvent.cs@@ -1,7 +1,7 @@using System;using GlazeWM.Infrastructure.Bussing;-namespace GlazeWM.Infrastructure.WindowsApi.Events+namespace GlazeWM.Infrastructure.Common.Events{public class WindowShownEvent : Event{diff --git a/GlazeWM.Infrastructure/WindowsApi/SystemEventService.cs b/GlazeWM.Infrastructure/WindowsApi/SystemEventService.csindex b34ea4dd..a199202c 100644--- a/GlazeWM.Infrastructure/WindowsApi/SystemEventService.cs+++ b/GlazeWM.Infrastructure/WindowsApi/SystemEventService.cs@@ -1,5 +1,5 @@using GlazeWM.Infrastructure.Bussing;-using GlazeWM.Infrastructure.WindowsApi.Events;+using GlazeWM.Infrastructure.Common.Events;using Microsoft.Win32;using System;using System.Reactive.Linq;diff --git a/GlazeWM.Infrastructure/WindowsApi/WindowEventService.cs b/GlazeWM.Infrastructure/WindowsApi/WindowEventService.csindex f6393f77..d1a35bb5 100644--- a/GlazeWM.Infrastructure/WindowsApi/WindowEventService.cs+++ b/GlazeWM.Infrastructure/WindowsApi/WindowEventService.cs@@ -1,6 +1,6 @@-using GlazeWM.Infrastructure.Bussing;+using GlazeWM.Infrastructure.Bussing;+using GlazeWM.Infrastructure.Common.Events;using GlazeWM.Infrastructure.WindowsApi.Enums;-using GlazeWM.Infrastructure.WindowsApi.Events;using System;using static GlazeWM.Infrastructure.WindowsApi.WindowsApiService;