mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 15:19:19 +02:00
also check whether ignore char for same window
git-svn-id: trunk@8289 -
This commit is contained in:
parent
49a8c3808d
commit
c31c0e00a4
@ -773,12 +773,19 @@ Begin
|
|||||||
lWinControl := WindowInfo^.WinControl;
|
lWinControl := WindowInfo^.WinControl;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if IgnoreNextChar and ((Msg = WM_CHAR) or (Msg = WM_SYSCHAR)) then
|
if (IgnoreNextCharWindow <> 0) and ((Msg = WM_CHAR) or (Msg = WM_SYSCHAR)) then
|
||||||
begin
|
begin
|
||||||
IgnoreNextChar := false;
|
if IgnoreNextCharWindow = Window then
|
||||||
|
begin
|
||||||
|
IgnoreNextCharWindow := 0;
|
||||||
|
{$ifdef MSG_DEBUG}
|
||||||
|
DebugLn(MessageStackDepth, ' *ignoring this character');
|
||||||
|
{$endif}
|
||||||
Result := 1;
|
Result := 1;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
IgnoreNextCharWindow := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
Assert(False, 'Trace:WindowProc - Getting Callback Object');
|
Assert(False, 'Trace:WindowProc - Getting Callback Object');
|
||||||
|
|
||||||
@ -1804,10 +1811,21 @@ Begin
|
|||||||
// ignore WM_(SYS)CHAR message if LCL handled WM_(SYS)KEYDOWN
|
// ignore WM_(SYS)CHAR message if LCL handled WM_(SYS)KEYDOWN
|
||||||
if ((Msg = WM_KEYDOWN) or (Msg = WM_SYSKEYDOWN))
|
if ((Msg = WM_KEYDOWN) or (Msg = WM_SYSKEYDOWN))
|
||||||
and (PLMsg^.Result <> 0) then
|
and (PLMsg^.Result <> 0) then
|
||||||
IgnoreNextChar := true;
|
begin
|
||||||
|
{$ifdef MSG_DEBUG}
|
||||||
|
writeln(MessageStackDepth, ' *ignore next character');
|
||||||
|
{$endif}
|
||||||
|
IgnoreNextCharWindow := Window;
|
||||||
|
end;
|
||||||
// stop ignoring if KEYUP has come by (not all keys generate CHAR)
|
// stop ignoring if KEYUP has come by (not all keys generate CHAR)
|
||||||
if ((Msg = WM_KEYUP) or (Msg = WM_SYSKEYUP)) then
|
if ((Msg = WM_KEYUP) or (Msg = WM_SYSKEYUP)) then
|
||||||
IgnoreNextChar := false;
|
begin
|
||||||
|
{$ifdef MSG_DEBUG}
|
||||||
|
if IgnoreNextCharWindow <> 0 then
|
||||||
|
writeln(MessageStackDepth, ' *stop ignoring next character');
|
||||||
|
{$endif}
|
||||||
|
IgnoreNextCharWindow := 0;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ LMMouseEvent and LMInsertText have no Result field }
|
{ LMMouseEvent and LMInsertText have no Result field }
|
||||||
|
@ -273,7 +273,7 @@ var
|
|||||||
MouseDownFocusWindow: HWND;
|
MouseDownFocusWindow: HWND;
|
||||||
MouseDownFocusStatus: TMouseDownFocusStatus = mfNone;
|
MouseDownFocusStatus: TMouseDownFocusStatus = mfNone;
|
||||||
ComboBoxHandleSizeWindow: HWND = 0;
|
ComboBoxHandleSizeWindow: HWND = 0;
|
||||||
IgnoreNextChar: boolean = false; // ignore next WM_(SYS)CHAR message
|
IgnoreNextCharWindow: HWND = 0; // ignore next WM_(SYS)CHAR message
|
||||||
OnClipBoardRequest: TClipboardRequestEvent;
|
OnClipBoardRequest: TClipboardRequestEvent;
|
||||||
{$ifdef MSG_DEBUG}
|
{$ifdef MSG_DEBUG}
|
||||||
MessageStackDepth: string = '';
|
MessageStackDepth: string = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user