Skip to content

Commit 465108a

Browse files
committed
Fix keyboard layout fetch issue
1 parent 023ab45 commit 465108a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Flow.Launcher.Infrastructure/Win32Helper.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,8 @@ public static unsafe void SetEnglishKeyboardLayout(bool backupPrevious)
371371
if (enHKL == HKL.Null) return;
372372

373373
// Get the current window thread ID
374-
uint threadId = 0;
375-
var result = PInvoke.GetWindowThreadProcessId(PInvoke.GetForegroundWindow(), &threadId);
376-
if (result == 0 || threadId == 0) throw new Win32Exception(Marshal.GetLastWin32Error());
374+
var threadId = PInvoke.GetWindowThreadProcessId(PInvoke.GetForegroundWindow());
375+
if (threadId == 0) throw new Win32Exception(Marshal.GetLastWin32Error());
377376

378377
// Backup current keyboard layout
379378
if (backupPrevious)

0 commit comments

Comments
 (0)