Refactor global shortcut handling to improve fallback logic on linux (#879)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-07-21 08:11:34 +02:00
1 parent 647d3ea4ef
commit b36b800028
2 files changed
+59 -34

No files matched your search

@@ -149,12 +149,12 @@ public sealed class GlobalShortcutService : BackgroundService, IMessageBusReceiv
&& !string.Equals(lastNonEmptyShortcut, requestedState.Shortcut, StringComparison.Ordinal);
var result = await this.rustService.UpdateGlobalShortcut(shortcutId, requestedState.Shortcut, description, reconfigure);
this.lastSentStates[shortcutId] = requestedState;
if (!string.IsNullOrWhiteSpace(requestedState.Shortcut))
this.lastNonEmptyShortcuts[shortcutId] = requestedState.Shortcut;
if (result.Success)
{
this.lastSentStates[shortcutId] = requestedState;
if (!string.IsNullOrWhiteSpace(requestedState.Shortcut))
this.lastNonEmptyShortcuts[shortcutId] = requestedState.Shortcut;
this.logger.LogInformation(
"Global shortcut '{ShortcutId}' ({Shortcut}) synchronized through {Backend}.",
shortcutId,