lcl: win32: ignore keyup without keydown at program start. issue #30836

git-svn-id: trunk@53324 -
This commit is contained in:
ondrej 2016-11-09 08:17:42 +00:00
parent e2c21deb0f
commit d725d7f542
2 changed files with 4 additions and 0 deletions

View File

@ -1955,6 +1955,8 @@ begin
end;
IgnoreNextCharWindow := 0;
end;
if IgnoreKeyUp and (Msg = WM_KEYUP) then
Exit(1);
case Msg of
WM_NULL:
@ -2155,6 +2157,7 @@ begin
DoMsgKeyDownUp(CN_KEYDOWN, Result);
WindowInfo^.IMEComposed:=False;
IgnoreNextCharWindow := Window;
IgnoreKeyUp := False;
end;
WM_KEYUP:
begin

View File

@ -271,6 +271,7 @@ var
LastMouse: TLastMouseInfo;
ComboBoxHandleSizeWindow: HWND = 0;
IgnoreNextCharWindow: HWND = 0; // ignore next WM_(SYS)CHAR message
IgnoreKeyUp: Boolean = True; // ignore KeyUp after application start; issue #30836
// set to true, if we are redirecting a WM_MOUSEWHEEL message, to prevent recursion
InMouseWheelRedirection: boolean = false;
OnClipBoardRequest: TClipboardRequestEvent;