Gtk2: Add option to disable "KeyEventWasHandledByLCL" => allow checking if new Gt2-IM code can deal with this. Define WITH_GTK2_IM for IM / Define WITHOUT_GTK_DOUBLEKEYPRESS_CHECK to disable current check

git-svn-id: trunk@65176 -
This commit is contained in:
martin 2021-06-05 22:33:55 +00:00
parent 176f0b3310
commit 67dbe4986f

View File

@ -2238,9 +2238,11 @@ begin
' Widget=',GetWidgetClassName(AWidget), ' Widget=',GetWidgetClassName(AWidget),
' Before=',ABeforeEvent,' Down=',AHandleDown,' HandledByLCL=',HandledByLCL<>nil]); ' Before=',ABeforeEvent,' Down=',AHandleDown,' HandledByLCL=',HandledByLCL<>nil]);
{$ENDIF} {$ENDIF}
// handle every key event only once // handle every key event only once
{$IFnDEF WITHOUT_GTK_DOUBLEKEYPRESS_CHECK}
if EventHandledByLCL<>nil then exit; if EventHandledByLCL<>nil then exit;
{$ENDIF}
while (not GtkWidgetIsA(AWidget, gtk_window_get_type)) and (AWidget^.parent <> nil) do while (not GtkWidgetIsA(AWidget, gtk_window_get_type)) and (AWidget^.parent <> nil) do
AWidget := AWidget^.parent; AWidget := AWidget^.parent;