summaryrefslogtreecommitdiff
path: root/src/runner.c
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-07-20 16:15:08 +0300
committerPaul Buetow <paul@buetow.org>2026-07-20 16:15:08 +0300
commitf6517a56a6e4d92468dfdda1656e80d57f302816 (patch)
treed8bb4eab52c0e65e6df1f1c9c06802ee6d44095f /src/runner.c
parent74f60c99446ad592b13119da8c79ccd19256b715 (diff)
shortcuts: GLOBAL scope so t/Esc reach window actions (2u0)
The GtkShortcutController on the window used MANAGED scope, so the viewer's own GtkEventControllerKey consumed key events before the window-level win.* shortcuts were consulted — t (toggle-view) and Esc (back) never fired. Switch to GLOBAL scope, which registers the shortcuts with the toplevel's global shortcut manager consulted before child key controllers. Comment notes the future-text-entry caveat. New integration test tests/test_shortcut.c (3 subtests): - controller_scope: asserts the window's shortcut controller is GLOBAL (and is ours, not GtkApplicationWindow's mnemonic controller). - keypath_toggle_and_back: verifies the t→win.toggle-view and Escape→win.back bindings (bidirectional keyval/action check) and dispatches them via gtk_shortcut_action_activate (the controller's own dispatch primitive), asserting the stack flips large↔grid. GTK 4.22 exposes no public GdkKeyEvent synthesis API, so this is the most faithful exercise of the keyboard shortcut path available. - full_table_registered: asserts all 16 win.* actions and all 20 shortcut rows are registered, guarding against table regressions. Notes a pre-existing, out-of-scope keybinding conflict: GTK4 normalizes GDK_KEY_G/0 to GDK_KEY_g/0 in GtkKeyvalTrigger, so win.last (G) collides with win.first (g); left unfixed per task's 'preserve existing behavior'.
Diffstat (limited to 'src/runner.c')
0 files changed, 0 insertions, 0 deletions