Skip to content

Commit bf011f1

Browse files
committed
Revert "Fix keyboard restore issue when window is deactivated"
This reverts commit 747f958.
1 parent cd28c09 commit bf011f1

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

Flow.Launcher/MainWindow.xaml.cs

+2-13
Original file line numberDiff line numberDiff line change
@@ -250,31 +250,20 @@ private void OnLocationChanged(object sender, EventArgs e)
250250

251251
private async void OnDeactivated(object sender, EventArgs e)
252252
{
253-
// When window is deactivated, FL cannot set keyboard correctly
254-
// This is a workaround to restore the keyboard layout
255-
if (_settings.HideWhenDeactivated && _viewModel.StartWithEnglishMode)
256-
{
257-
Activate();
258-
QueryTextBox.Focus();
259-
Win32Helper.RestorePreviousKeyboardLayout();
260-
}
261-
262253
_settings.WindowLeft = Left;
263254
_settings.WindowTop = Top;
264255
ClockPanel.Opacity = 0;
265256
SearchIcon.Opacity = 0;
266-
267-
// This condition stops extra hide call when animator is on,
257+
//This condition stops extra hide call when animator is on,
268258
// which causes the toggling to occasional hide instead of show.
269259
if (_viewModel.MainWindowVisibilityStatus)
270260
{
271261
// Need time to initialize the main query window animation.
272262
// This also stops the mainwindow from flickering occasionally after Settings window is opened
273263
// and always after Settings window is closed.
274264
if (_settings.UseAnimation)
275-
{
265+
276266
await Task.Delay(100);
277-
}
278267

279268
if (_settings.HideWhenDeactivated && !_viewModel.ExternalPreviewVisible)
280269
{

0 commit comments

Comments
 (0)