Skip to content

Commit

Permalink
[WinForms.Native.HotkeyManager] Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingpie committed Oct 30, 2024
1 parent fb23bf7 commit 9e01ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/20-Services/Wtq.Services.WinForms/Native/HotkeyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static HotkeyManager()

private delegate void RegisterHotkeyDelegate(nint hwnd, int id, uint modifiers, uint key);

private delegate void UnRegisterHotkeyDelegate(nint hwnd, int id);
private delegate void UnregisterHotkeyDelegate(nint hwnd, int id);

/// <summary>
/// Fired when the registered hotkey is pressed. Note that <see cref="RegisterHotkey"/> needs to be called first.
Expand All @@ -50,7 +50,7 @@ public static int RegisterHotkey(Keys key, KeyModifiers modifiers)

public static void UnregisterHotkey(int id)
{
_wnd.Invoke(new UnRegisterHotkeyDelegate((hwnd, id) => User32.UnregisterHotKey(_hwnd, id)), _hwnd, id);
_wnd.Invoke(new UnregisterHotkeyDelegate((hwnd, id) => User32.UnregisterHotKey(_hwnd, id)), _hwnd, id);
}

/// <summary>
Expand Down

0 comments on commit 9e01ef2

Please sign in to comment.