mirror of
https://github.com/2dust/v2rayN.git
synced 2026-07-26 09:52:05 +03:00
Synchronize GlobalHotKeys library and update HotKeyManager
This commit is contained in:
Submodule v2rayN/GlobalHotKeys updated: 569a95bb0f...162d401dfe
@@ -8,6 +8,7 @@ public sealed class HotkeyManager
|
||||
private static readonly Lazy<HotkeyManager> _instance = new(() => new());
|
||||
public static HotkeyManager Instance = _instance.Value;
|
||||
private readonly Dictionary<int, EGlobalHotkey> _hotkeyTriggerDic = new();
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
private GlobalHotKeys.HotKeyManager? _hotKeyManager;
|
||||
|
||||
@@ -74,9 +75,7 @@ public sealed class HotkeyManager
|
||||
}
|
||||
}
|
||||
|
||||
_hotKeyManager?.HotKeyPressed
|
||||
.ObserveOn(AvaloniaScheduler.Instance)
|
||||
.Subscribe(OnNext);
|
||||
_hotKeyManager.HotKeyPressed += OnNext;
|
||||
}
|
||||
|
||||
private void OnNext(HotKey key)
|
||||
|
||||
@@ -257,7 +257,7 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
|
||||
switch (e)
|
||||
{
|
||||
case EGlobalHotkey.ShowForm:
|
||||
ShowHideWindow(null);
|
||||
Dispatcher.UIThread.Post(() => ShowHideWindow(null));
|
||||
break;
|
||||
|
||||
case EGlobalHotkey.SystemProxyClear:
|
||||
|
||||
Reference in New Issue
Block a user