From ec02dc0f96df9abbb4ffba64714b2344cb695a70 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Wed, 3 Apr 2024 04:10:24 +0300 Subject: [PATCH] asd --- LightBulb.PlatformInterop/GlobalHotKey.cs | 2 +- LightBulb.PlatformInterop/Internal/NativeMethods.User32.cs | 2 +- LightBulb.PlatformInterop/Internal/WndProcSponge.cs | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/LightBulb.PlatformInterop/GlobalHotKey.cs b/LightBulb.PlatformInterop/GlobalHotKey.cs index 914c8ee..36e62b7 100644 --- a/LightBulb.PlatformInterop/GlobalHotKey.cs +++ b/LightBulb.PlatformInterop/GlobalHotKey.cs @@ -59,7 +59,7 @@ public partial class GlobalHotKey public static GlobalHotKey? TryRegister(int virtualKey, int modifiers, Action callback) { var handle = Interlocked.Increment(ref _lastHotKeyHandle); - + if ( !NativeMethods.RegisterHotKey( WndProcSponge.Default.Handle, diff --git a/LightBulb.PlatformInterop/Internal/NativeMethods.User32.cs b/LightBulb.PlatformInterop/Internal/NativeMethods.User32.cs index 9bb855f..e4298c9 100644 --- a/LightBulb.PlatformInterop/Internal/NativeMethods.User32.cs +++ b/LightBulb.PlatformInterop/Internal/NativeMethods.User32.cs @@ -15,7 +15,7 @@ public static extern bool EnumDisplayMonitors( EnumMonitorsProc lpfnEnum, nint dwData ); - + [DllImport(User32, SetLastError = true)] public static extern nint MonitorFromWindow(nint hWnd, uint dwFlags); diff --git a/LightBulb.PlatformInterop/Internal/WndProcSponge.cs b/LightBulb.PlatformInterop/Internal/WndProcSponge.cs index 50e32a7..6e9ad46 100644 --- a/LightBulb.PlatformInterop/Internal/WndProcSponge.cs +++ b/LightBulb.PlatformInterop/Internal/WndProcSponge.cs @@ -67,12 +67,7 @@ internal partial class WndProcSponge } ); - var classInfo = new WndClassEx - { - ClassName = ClassName, - WndProc = wndProc - }; - + var classInfo = new WndClassEx { ClassName = ClassName, WndProc = wndProc }; var classHandle = NativeMethods.RegisterClassEx(ref classInfo); if (classHandle == 0) {