Skip to content

Commit ff9f1e1

Browse files
authored
Merge branch 'dev' into delete_clipboard_jsonrpc
2 parents 0314a9f + f3ff865 commit ff9f1e1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Flow.Launcher.Infrastructure/Win32Helper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,8 @@ public static unsafe void SwitchToEnglishKeyboardLayout(bool backupPrevious)
450450
if (!IsForegroundWindow(hwnd))
451451
{
452452
var result = PInvoke.SetForegroundWindow(hwnd);
453-
if (!result) throw new Win32Exception(Marshal.GetLastWin32Error());
453+
// If we cannot set the foreground window, we can use the foreground window and switch the layout
454+
if (!result) hwnd = PInvoke.GetForegroundWindow();
454455
}
455456

456457
// Get the current foreground window thread ID

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea
351351
</p>
352352
<p align="center">
353353
<a href="https://github.com/itsonlyfrans"><img src="https://avatars.githubusercontent.com/u/46535667?v=4" width="10%" /></a>
354+
<a href="https://github.com/atilford"><img src="https://avatars.githubusercontent.com/u/13649625?v=4" width="10%" /></a>
354355
<a href="https://github.com/andreqramos"><img src="https://avatars.githubusercontent.com/u/49326063?v=4" width="10%" /></a>
355356
<a href="https://github.com/Yuba4"><img src="https://avatars.githubusercontent.com/u/46278200?v=4" width="10%" /></a>
356357
<a href="https://github.com/Mavrik327"><img src="https://avatars.githubusercontent.com/u/121626149?v=4" width="10%" /></a>

0 commit comments

Comments
 (0)