[Lazarus] GTK3, OnKeyDown

Juha Manninen juha.manninen62 at gmail.com
Sat May 16 21:18:51 CEST 2020

Strange. With LCL-GTK3 a Form.OnKeyDown handler is not called.
The test app from issue :
can be used. It has a splashscreen but have tested with a normal form,
too. Same effect.

The attached patch takes out a test
  if Widget^.has_focus then
in function Gtk3WidgetEvent(). Then an OnKeyDown handler is called twice.
Strangely enough, debugger shows the following line
  Result := TGtk3Widget(Data).GtkEventKey(Widget, Event, True);
is called at least sometimes even when the Widget^.has_focus test is there.
The message is delivered somewhere but not to the form.
GTK3 experts, do you know what is going on?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-LCL-GTK3-Make-TForm.OnKeyDown-work.patch
Type: text/x-patch
Size: 1053 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200516/61f215ad/attachment-0001.bin>

More information about the lazarus mailing list