Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Apr 3, 2024
1 parent cd06fba commit ec02dc0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LightBulb.PlatformInterop/GlobalHotKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion LightBulb.PlatformInterop/Internal/NativeMethods.User32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
7 changes: 1 addition & 6 deletions LightBulb.PlatformInterop/Internal/WndProcSponge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit ec02dc0

Please sign in to comment.