Skip to content

Commit 2523faa

Browse files
committed
Missing GTK4 event management code from Copilot suggestions
This is needed for the esc key to be responsive, and mouse actions.
1 parent d433c9a commit 2523faa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

SkiaGTK4_AdvancedGL_Version2.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def __init__(self, state):
6363
# Keyboard events
6464
self.key_controller = Gtk.EventControllerKey.new()
6565
self.key_controller.connect("key-pressed", self.on_key_press)
66+
self.add_controller(self.motion_controller)
67+
self.add_controller(self.click_gesture)
68+
self.add_controller(self.key_controller)
6669
# --- End GTK4 event controller setup ---
6770

6871
self.state = state

0 commit comments

Comments
 (0)