From ce43c6444d853efdf830f8dffae0815922aed0f1 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Sun, 23 Mar 2025 00:40:04 -0500 Subject: [PATCH] Remove Cairo-specific code --- src/ManagedShell.AppBar/AppBarEventArgs.cs | 9 --------- src/ManagedShell.AppBar/AppBarEventReason.cs | 8 -------- src/ManagedShell.AppBar/AppBarManager.cs | 7 ------- src/ManagedShell.AppBar/AppBarWindow.cs | 5 ----- src/ManagedShell.AppBar/ScreenSetupReason.cs | 5 +---- 5 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 src/ManagedShell.AppBar/AppBarEventArgs.cs delete mode 100644 src/ManagedShell.AppBar/AppBarEventReason.cs diff --git a/src/ManagedShell.AppBar/AppBarEventArgs.cs b/src/ManagedShell.AppBar/AppBarEventArgs.cs deleted file mode 100644 index ac34e162..00000000 --- a/src/ManagedShell.AppBar/AppBarEventArgs.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace ManagedShell.AppBar -{ - public class AppBarEventArgs : EventArgs - { - public AppBarEventReason Reason; - } -} \ No newline at end of file diff --git a/src/ManagedShell.AppBar/AppBarEventReason.cs b/src/ManagedShell.AppBar/AppBarEventReason.cs deleted file mode 100644 index 3ac686be..00000000 --- a/src/ManagedShell.AppBar/AppBarEventReason.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ManagedShell.AppBar -{ - public enum AppBarEventReason - { - MouseEnter, - MouseLeave - } -} \ No newline at end of file diff --git a/src/ManagedShell.AppBar/AppBarManager.cs b/src/ManagedShell.AppBar/AppBarManager.cs index acd47a56..eeefda60 100644 --- a/src/ManagedShell.AppBar/AppBarManager.cs +++ b/src/ManagedShell.AppBar/AppBarManager.cs @@ -19,7 +19,6 @@ public class AppBarManager : IDisposable public List AppBars { get; } = new List(); public List AutoHideBars { get; } = new List(); - public EventHandler AppBarEvent; public AppBarManager(ExplorerHelper explorerHelper) { @@ -37,12 +36,6 @@ public void SignalGracefulShutdown() } } - public void NotifyAppBarEvent(AppBarWindow sender, AppBarEventReason reason) - { - AppBarEventArgs args = new AppBarEventArgs { Reason = reason }; - AppBarEvent?.Invoke(sender, args); - } - private IntPtr appBarMessageDelegate(APPBARMSGDATAV3 amd, ref bool handled) { // only handle certain messages, send other AppBar messages to default handler diff --git a/src/ManagedShell.AppBar/AppBarWindow.cs b/src/ManagedShell.AppBar/AppBarWindow.cs index 1cd4df66..a2a01211 100644 --- a/src/ManagedShell.AppBar/AppBarWindow.cs +++ b/src/ManagedShell.AppBar/AppBarWindow.cs @@ -565,11 +565,6 @@ protected virtual IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lPa ProcessScreenChange(ScreenSetupReason.DeviceChange); handled = true; } - else if (msg == (int)NativeMethods.WM.DWMCOMPOSITIONCHANGED) - { - ProcessScreenChange(ScreenSetupReason.DwmChange); - handled = true; - } return IntPtr.Zero; } diff --git a/src/ManagedShell.AppBar/ScreenSetupReason.cs b/src/ManagedShell.AppBar/ScreenSetupReason.cs index d30f96d8..e8a53ece 100644 --- a/src/ManagedShell.AppBar/ScreenSetupReason.cs +++ b/src/ManagedShell.AppBar/ScreenSetupReason.cs @@ -4,9 +4,6 @@ public enum ScreenSetupReason { DeviceChange, DisplayChange, - DpiChange, - DwmChange, - FirstRun, - Reconciliation + DpiChange } } \ No newline at end of file