mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.4170: MS-Windows: still using old message API calls
Problem: MS-Windows: still using old message API calls. Solution: Call the "W" functions directly. (Ken Takata, closes #9582)
This commit is contained in:
@@ -636,7 +636,7 @@ _OnBlinkTimer(
|
|||||||
KillTimer(NULL, idEvent);
|
KillTimer(NULL, idEvent);
|
||||||
|
|
||||||
// Eat spurious WM_TIMER messages
|
// Eat spurious WM_TIMER messages
|
||||||
while (pPeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
while (PeekMessageW(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
||||||
;
|
;
|
||||||
|
|
||||||
if (blink_state == BLINK_ON)
|
if (blink_state == BLINK_ON)
|
||||||
@@ -665,7 +665,7 @@ gui_mswin_rm_blink_timer(void)
|
|||||||
{
|
{
|
||||||
KillTimer(NULL, blink_timer);
|
KillTimer(NULL, blink_timer);
|
||||||
// Eat spurious WM_TIMER messages
|
// Eat spurious WM_TIMER messages
|
||||||
while (pPeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
while (PeekMessageW(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
||||||
;
|
;
|
||||||
blink_timer = 0;
|
blink_timer = 0;
|
||||||
}
|
}
|
||||||
@@ -726,7 +726,7 @@ _OnTimer(
|
|||||||
s_timed_out = TRUE;
|
s_timed_out = TRUE;
|
||||||
|
|
||||||
// Eat spurious WM_TIMER messages
|
// Eat spurious WM_TIMER messages
|
||||||
while (pPeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
while (PeekMessageW(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
||||||
;
|
;
|
||||||
if (idEvent == s_wait_timer)
|
if (idEvent == s_wait_timer)
|
||||||
s_wait_timer = 0;
|
s_wait_timer = 0;
|
||||||
@@ -1844,7 +1844,7 @@ process_message(void)
|
|||||||
static char_u k10[] = {K_SPECIAL, 'k', ';', 0};
|
static char_u k10[] = {K_SPECIAL, 'k', ';', 0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pGetMessage(&msg, NULL, 0, 0);
|
GetMessageW(&msg, NULL, 0, 0);
|
||||||
|
|
||||||
#ifdef FEAT_OLE
|
#ifdef FEAT_OLE
|
||||||
// Look after OLE Automation commands
|
// Look after OLE Automation commands
|
||||||
@@ -1855,7 +1855,7 @@ process_message(void)
|
|||||||
{
|
{
|
||||||
// Message can't be ours, forward it. Fixes problem with Ultramon
|
// Message can't be ours, forward it. Fixes problem with Ultramon
|
||||||
// 3.0.4
|
// 3.0.4
|
||||||
pDispatchMessage(&msg);
|
DispatchMessageW(&msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1868,7 +1868,7 @@ process_message(void)
|
|||||||
|
|
||||||
#ifdef MSWIN_FIND_REPLACE
|
#ifdef MSWIN_FIND_REPLACE
|
||||||
// Don't process messages used by the dialog
|
// Don't process messages used by the dialog
|
||||||
if (s_findrep_hwnd != NULL && pIsDialogMessage(s_findrep_hwnd, &msg))
|
if (s_findrep_hwnd != NULL && IsDialogMessageW(s_findrep_hwnd, &msg))
|
||||||
{
|
{
|
||||||
HandleMouseHide(msg.message, msg.lParam);
|
HandleMouseHide(msg.message, msg.lParam);
|
||||||
return;
|
return;
|
||||||
@@ -2065,7 +2065,7 @@ process_message(void)
|
|||||||
if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE,
|
if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE,
|
||||||
NULL, NULL) == NULL)
|
NULL, NULL) == NULL)
|
||||||
#endif
|
#endif
|
||||||
pDispatchMessage(&msg);
|
DispatchMessageW(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2080,7 +2080,7 @@ gui_mch_update(void)
|
|||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
if (!s_busy_processing)
|
if (!s_busy_processing)
|
||||||
while (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)
|
while (PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE)
|
||||||
&& !vim_is_input_buf_full())
|
&& !vim_is_input_buf_full())
|
||||||
process_message();
|
process_message();
|
||||||
}
|
}
|
||||||
@@ -2095,7 +2095,7 @@ remove_any_timer(void)
|
|||||||
KillTimer(NULL, s_wait_timer);
|
KillTimer(NULL, s_wait_timer);
|
||||||
|
|
||||||
// Eat spurious WM_TIMER messages
|
// Eat spurious WM_TIMER messages
|
||||||
while (pPeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
while (PeekMessageW(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
|
||||||
;
|
;
|
||||||
s_wait_timer = 0;
|
s_wait_timer = 0;
|
||||||
}
|
}
|
||||||
@@ -2163,7 +2163,7 @@ gui_mch_wait_for_chars(int wtime)
|
|||||||
if (did_add_timer)
|
if (did_add_timer)
|
||||||
break;
|
break;
|
||||||
# endif
|
# endif
|
||||||
if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
|
if (PeekMessageW(&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||||
{
|
{
|
||||||
process_message();
|
process_message();
|
||||||
break;
|
break;
|
||||||
|
@@ -1123,12 +1123,12 @@ AbortProc(HDC hdcPrn UNUSED, int iCode UNUSED)
|
|||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
while (!*bUserAbort && pPeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
while (!*bUserAbort && PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
if (!hDlgPrint || !pIsDialogMessage(hDlgPrint, &msg))
|
if (!hDlgPrint || !IsDialogMessageW(hDlgPrint, &msg))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
pDispatchMessage(&msg);
|
DispatchMessageW(&msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return !*bUserAbort;
|
return !*bUserAbort;
|
||||||
@@ -2576,10 +2576,10 @@ serverProcessPendingMessages(void)
|
|||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
while (pPeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
pDispatchMessage(&msg);
|
DispatchMessageW(&msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4123,10 +4123,10 @@ mch_system_classic(char *cmd, int options)
|
|||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
|
if (PeekMessageW(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
pDispatchMessage(&msg);
|
DispatchMessageW(&msg);
|
||||||
delay = 1;
|
delay = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -4445,10 +4445,10 @@ mch_system_piped(char *cmd, int options)
|
|||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
|
if (PeekMessageW(&msg, (HWND)NULL, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
pDispatchMessage(&msg);
|
DispatchMessageW(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// write pipe information in the window
|
// write pipe information in the window
|
||||||
|
@@ -199,9 +199,3 @@ Trace(char *pszFormat, ...);
|
|||||||
#endif
|
#endif
|
||||||
#define mch_getenv(x) (char_u *)getenv((char *)(x))
|
#define mch_getenv(x) (char_u *)getenv((char *)(x))
|
||||||
#define vim_mkdir(x, y) mch_mkdir(x)
|
#define vim_mkdir(x, y) mch_mkdir(x)
|
||||||
|
|
||||||
// Enable common dialogs input unicode from IME if possible.
|
|
||||||
#define pDispatchMessage DispatchMessageW
|
|
||||||
#define pGetMessage GetMessageW
|
|
||||||
#define pIsDialogMessage IsDialogMessageW
|
|
||||||
#define pPeekMessage PeekMessageW
|
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4170,
|
||||||
/**/
|
/**/
|
||||||
4169,
|
4169,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user