mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-27 22:09:29 +02:00
IgnoreNextChar is buggy because of nested Application.ProcessMessages call; try another approach by not needing to use WM_KEYUP, WM_SYSKEYUP
git-svn-id: trunk@8292 -
This commit is contained in:
parent
e2e22e4fb9
commit
a9f62aa809
@ -1806,20 +1806,18 @@ Begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// make sure there is a WindowInfo to store the info
|
||||
if Assigned(WindowInfo) and (WindowInfo <> @DefaultWindowInfo) then begin
|
||||
// ignore WM_(SYS)CHAR message if LCL handled WM_(SYS)KEYDOWN
|
||||
if ((Msg = WM_KEYDOWN) or (Msg = WM_SYSKEYDOWN))
|
||||
and (PLMsg^.Result <> 0) then
|
||||
// ignore WM_(SYS)CHAR message if LCL handled WM_(SYS)KEYDOWN
|
||||
if ((Msg = WM_KEYDOWN) or (Msg = WM_SYSKEYDOWN)) then
|
||||
begin
|
||||
if (PLMsg^.Result <> 0) then
|
||||
begin
|
||||
{$ifdef MSG_DEBUG}
|
||||
writeln(MessageStackDepth, ' *ignore next character');
|
||||
{$endif}
|
||||
{$endif}
|
||||
IgnoreNextCharWindow := Window;
|
||||
end;
|
||||
// stop ignoring if KEYUP has come by (not all keys generate CHAR)
|
||||
if ((Msg = WM_KEYUP) or (Msg = WM_SYSKEYUP)) then
|
||||
begin
|
||||
end else begin
|
||||
// stop ignoring if KEYUP has come by (not all keys generate CHAR)
|
||||
// assume WM_CHAR is always preceded by WM_KEYDOWN
|
||||
{$ifdef MSG_DEBUG}
|
||||
if IgnoreNextCharWindow <> 0 then
|
||||
writeln(MessageStackDepth, ' *stop ignoring next character');
|
||||
|
Loading…
Reference in New Issue
Block a user