Skip to content

Commit 5ae1c4b

Browse files
committed
Fast show window from hidden window
1 parent 6c379d3 commit 5ae1c4b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,11 +1602,14 @@ public async void SetupQuickSwitch(nint handle)
16021602
PreviousMainWindowVisibilityStatus = MainWindowVisibilityStatus;
16031603
DialogWindowHandle = handle;
16041604
IsQuickSwitch = true;
1605-
}
16061605

1607-
await Task.Delay(300); // If don't give a time, Positioning will be weird.
1606+
// Wait for a while to make sure the dialog is shown
1607+
// If don't give a time, Positioning will be weird
1608+
await Task.Delay(300);
1609+
}
16081610

1609-
if (DialogWindowHandle == nint.Zero) return; // If handle is cleared, which means the dialog is closed, do nothing
1611+
// If handle is cleared, which means the dialog is closed, do nothing
1612+
if (DialogWindowHandle == nint.Zero) return;
16101613

16111614
if (MainWindowVisibilityStatus)
16121615
{

0 commit comments

Comments
 (0)