Skip to content

Commit 8af41b6

Browse files
committed
Make sure quick switch state reset
1 parent 170c085 commit 8af41b6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,11 +1936,16 @@ public async Task SetupQuickSwitchAsync(nint handle)
19361936

19371937
public async void ResetQuickSwitch()
19381938
{
1939-
if (DialogWindowHandle == nint.Zero) return;
1939+
// Cache original dialog window handle
1940+
var dialogWindowHandle = DialogWindowHandle;
19401941

1942+
// Reset the quick switch state
19411943
DialogWindowHandle = nint.Zero;
19421944
_isQuickSwitch = false;
19431945

1946+
// If dialog window handle is not set, we should not reset the main window visibility
1947+
if (dialogWindowHandle == nint.Zero) return;
1948+
19441949
if (_previousMainWindowVisibilityStatus != MainWindowVisibilityStatus)
19451950
{
19461951
// Show or hide to change visibility

0 commit comments

Comments
 (0)