To: vim-dev@vim.org Subject: patch 5.4.x9 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.4.x9 Problem: Win32 GUI: After executing an external command, focus is not always regained (when using focus-follows-mouse). Solution: Add SetFocus() in mch_system(). (Mike Steed) Files: src/os_win32.c *** ../vim-5.4.47/src/os_win32.c Sun Aug 22 16:12:25 1999 --- src/os_win32.c Fri Aug 27 20:50:37 1999 *************** *** 2276,2281 **** --- 2276,2282 ---- STARTUPINFO si; PROCESS_INFORMATION pi; DWORD ret = 0; + HWND hwnd = GetFocus(); si.cb = sizeof(si); si.lpReserved = NULL; *************** *** 2382,2387 **** --- 2383,2391 ---- if (fUseConsole) mch_close_console(!(options & SHELL_DOOUT), ret); #endif + + /* Try to get input focus back. Doesn't always work though. */ + SetFocus(hwnd); return ret; } -- MAN: You don't frighten us, English pig-dog! Go and boil your bottoms, son of a silly person. I blow my nose on you, so-called Arthur-king, you and your silly English K...kaniggets. He puts hands to his ears and blows a raspberry. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /