Skip to content

Commit 382d0c2

Browse files
committed
Don't broadcast language change
1 parent bf011f1 commit 382d0c2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Flow.Launcher.Infrastructure/NativeMethods.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,5 @@ ActivateKeyboardLayout
5454
GetKeyboardLayoutList
5555

5656
PostMessage
57-
HWND_BROADCAST
5857
WM_INPUTLANGCHANGEREQUEST
5958
INPUTLANGCHANGE_FORWARD

Flow.Launcher.Infrastructure/Win32Helper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,9 @@ public static void RestorePreviousKeyboardLayout()
403403
{
404404
if (_previousLayout == HKL.Null) return;
405405

406-
PInvoke.PostMessage(HWND.HWND_BROADCAST,
406+
var hwnd = PInvoke.GetForegroundWindow();
407+
PInvoke.PostMessage(
408+
hwnd,
407409
PInvoke.WM_INPUTLANGCHANGEREQUEST,
408410
PInvoke.INPUTLANGCHANGE_FORWARD,
409411
_previousLayout.Value

0 commit comments

Comments
 (0)