File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Flow.Launcher.Infrastructure Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments