[gnome-mines/arnaudb/wip/gtk4: 55/85] Update EventController thing.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines/arnaudb/wip/gtk4: 55/85] Update EventController thing.
- Date: Wed, 9 Sep 2020 15:04:07 +0000 (UTC)
commit 83914e0e4c1290178eb2acc4b3dda0f12ccc0cf1
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Apr 13 22:54:06 2020 +0200
Update EventController thing.
src/minefield-view.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index 61595b1..346161e 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -436,9 +436,10 @@ public class MinefieldView : Gtk.Grid
private inline void init_keyboard () // called on construct
{
- key_controller = new Gtk.EventControllerKey (this);
+ key_controller = new Gtk.EventControllerKey ();
key_controller.key_pressed.connect (on_key_pressed);
key_controller.key_released.connect (on_key_released);
+ add_controller (key_controller);
}
private inline bool on_key_pressed (Gtk.EventControllerKey _key_controller, uint keyval, uint keycode,
Gdk.ModifierType state)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]