From a6c7b6fdb278ef5c99d343894a188a80db849cb7 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Wed, 21 Jan 2009 10:10:04 -0500 Subject: [PATCH] richedit: Typing is ignored while mouse is captured. I noticed a while ago that on Windows XP richedit controls ignored characters typed while the mouse is captured (e.g. from holding the left or middle button down). Arrow keys, delete, and backspace, copying, cutting, pasting, and everything else handled on WM_CHAR and WM_KEYDOWN messages are also ignored. --- dlls/riched20/editor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 09f3fb3701e..33964d64b0f 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2155,6 +2155,8 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; BOOL shift_is_down = GetKeyState(VK_SHIFT) & 0x8000; + if (editor->bMouseCaptured) + return FALSE; if (nKey != VK_SHIFT && nKey != VK_CONTROL && nKey != VK_MENU) editor->nSelectionType = stPosition; @@ -2400,6 +2402,9 @@ static LRESULT ME_Char(ME_TextEditor *editor, WPARAM charCode, { WCHAR wstr; + if (editor->bMouseCaptured) + return 0; + if (unicode) wstr = (WCHAR)charCode; else