summaryrefslogtreecommitdiffstats
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorK.Takata <kentkt@csc.jp>2022-09-07 19:03:42 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-07 19:03:42 +0100
commitfef38d86a1fc3790d2ca7fc4b3e45071c1d8c79c (patch)
treec73c66df00f87e140ad49a2b7d6bc28acefbdf7b /src/gui_w32.c
parent75a115e8d632e96b4f45dc5145ba261876a83dcf (diff)
patch 9.0.0408: GUI test sometimes fails on MS-Windowsv9.0.0408
Problem: GUI test sometimes fails on MS-Windows. Solution: Make sure Vim is the foreground window. (Ken Takata, closes #11077)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 20b0a5f64e..8ae0cd069b 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -8649,6 +8649,7 @@ test_gui_w32_sendevent(dict_T *args)
inputs[0].ki.wVk = vkCode;
if (STRICMP(event, "keyup") == 0)
inputs[0].ki.dwFlags = KEYEVENTF_KEYUP;
+ (void)SetForegroundWindow(s_hwnd);
SendInput(ARRAYSIZE(inputs), inputs, sizeof(INPUT));
}
else