[Lazarus] GTK3, OnKeyDown

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] GTK3, OnKeyDown

Free Pascal - Lazarus mailing list
Strange. With LCL-GTK3 a Form.OnKeyDown handler is not called.
The test app from issue :
 https://bugs.freepascal.org/view.php?id=37073
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?

Juha

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

0001-LCL-GTK3-Make-TForm.OnKeyDown-work.patch (1K) Download Attachment