Skip to content

Commit afba3c0

Browse files
committed
Initialize hotkey mapper after window is loaded
1 parent 4eba415 commit afba3c0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Flow.Launcher/App.xaml.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
179179
Current.MainWindow = _mainWindow;
180180
Current.MainWindow.Title = Constant.FlowLauncher;
181181

182-
HotKeyMapper.Initialize();
183-
184182
// main windows needs initialized before theme change because of blur settings
185183
Ioc.Default.GetRequiredService<Theme>().ChangeTheme();
186184

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ private async void OnLoaded(object sender, RoutedEventArgs _)
173173
// Without this part, when shown for the first time, switching the context menu does not move the cursor to the end.
174174
_viewModel.QueryTextCursorMovedToEnd = false;
175175

176+
// Initialize hotkey mapper after window shown or hiden the first it is loaded
177+
HotKeyMapper.Initialize();
178+
176179
// View model property changed event
177180
_viewModel.PropertyChanged += (o, e) =>
178181
{

0 commit comments

Comments
 (0)