comparison src/gui_w32.c @ 18742:e9b2ade1adbd v8.1.2361

patch 8.1.2361: MS-Windows: test failures related to VIMDLL Commit: https://github.com/vim/vim/commit/310c32e8920140f0db747c6c6eb06b1ee53cdb5a Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 29 23:15:25 2019 +0100 patch 8.1.2361: MS-Windows: test failures related to VIMDLL Problem: MS-Windows: test failures related to VIMDLL. Solution: Adjust code and tests. (Ken Takata, closes https://github.com/vim/vim/issues/5283)
author Bram Moolenaar <Bram@vim.org>
date Fri, 29 Nov 2019 23:30:04 +0100
parents 652ac5edf8d0
children 49b78d6465e5
comparison
equal deleted inserted replaced
18741:3f42c89cf06c 18742:e9b2ade1adbd
5744 im_set_active(int active) 5744 im_set_active(int active)
5745 { 5745 {
5746 HIMC hImc; 5746 HIMC hImc;
5747 static HIMC hImcOld = (HIMC)0; 5747 static HIMC hImcOld = (HIMC)0;
5748 5748
5749 # ifdef VIMDLL
5750 if (!gui.in_use && !gui.starting)
5751 {
5752 mbyte_im_set_active(active);
5753 return;
5754 }
5755 # endif
5756
5749 if (pImmGetContext) /* if NULL imm32.dll wasn't loaded (yet) */ 5757 if (pImmGetContext) /* if NULL imm32.dll wasn't loaded (yet) */
5750 { 5758 {
5751 if (p_imdisable) 5759 if (p_imdisable)
5752 { 5760 {
5753 if (hImcOld == (HIMC)0) 5761 if (hImcOld == (HIMC)0)
5812 int 5820 int
5813 im_get_status(void) 5821 im_get_status(void)
5814 { 5822 {
5815 int status = 0; 5823 int status = 0;
5816 HIMC hImc; 5824 HIMC hImc;
5825
5826 # ifdef VIMDLL
5827 if (!gui.in_use && !gui.starting)
5828 return mbyte_im_get_status();
5829 # endif
5817 5830
5818 if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0) 5831 if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0)
5819 { 5832 {
5820 status = pImmGetOpenStatus(hImc) ? 1 : 0; 5833 status = pImmGetOpenStatus(hImc) ? 1 : 0;
5821 pImmReleaseContext(s_hwnd, hImc); 5834 pImmReleaseContext(s_hwnd, hImc);