mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
parent
4146f4d309
commit
f83e8eddb6
3 changed files with 10 additions and 18 deletions
|
|
@ -242,8 +242,6 @@
|
|||
InputMethod.PreferredImeState="{Binding StartWithEnglishMode, Converter={StaticResource BoolToIMEStateConverter}}"
|
||||
PreviewDragOver="QueryTextBox_OnPreviewDragOver"
|
||||
PreviewKeyUp="QueryTextBox_KeyUp"
|
||||
GotKeyboardFocus="QueryTextBox_OnGotKeyboardFocus"
|
||||
PreviewLostKeyboardFocus="QueryTextBox_OnPreviewLostKeyboardFocus"
|
||||
Style="{DynamicResource QueryBoxStyle}"
|
||||
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="Visible"
|
||||
|
|
|
|||
|
|
@ -989,22 +989,6 @@ namespace Flow.Launcher
|
|||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void QueryTextBox_OnGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
|
||||
{
|
||||
if (_viewModel.StartWithEnglishMode)
|
||||
{
|
||||
Win32Helper.SwitchToEnglishKeyboardLayout(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void QueryTextBox_OnPreviewLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
|
||||
{
|
||||
if (_viewModel.StartWithEnglishMode)
|
||||
{
|
||||
Win32Helper.RestorePreviousKeyboardLayout();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1373,6 +1373,11 @@ namespace Flow.Launcher.ViewModel
|
|||
MainWindowOpacity = 1;
|
||||
MainWindowVisibilityStatus = true;
|
||||
VisibilityChanged?.Invoke(this, new VisibilityChangedEventArgs { IsVisible = true });
|
||||
|
||||
if (StartWithEnglishMode)
|
||||
{
|
||||
Win32Helper.SwitchToEnglishKeyboardLayout(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1442,6 +1447,11 @@ namespace Flow.Launcher.ViewModel
|
|||
Win32Helper.DWMSetCloakForWindow(mainWindow, true);
|
||||
}
|
||||
|
||||
if (StartWithEnglishMode)
|
||||
{
|
||||
Win32Helper.RestorePreviousKeyboardLayout();
|
||||
}
|
||||
|
||||
await Task.Delay(50);
|
||||
|
||||
// Update WPF properties
|
||||
|
|
|
|||
Loading…
Reference in a new issue