From 147d5b0f3e7ffe3273f0b39de7d1b7532b78fca5 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Wed, 9 Aug 2023 20:08:47 +0200 Subject: [PATCH] gtk: fix arrow-up stealing focus This fixes #253 -- with essentially a single line! Just took me a while to find out where to add this line. Turns out we already solved this problem for `` so now we do the same thing for ``: we tell the `GtkApplication` we handled the event so it doesn't propagate any further. --- src/apprt/gtk.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/apprt/gtk.zig b/src/apprt/gtk.zig index bbdbccd43..837541074 100644 --- a/src/apprt/gtk.zig +++ b/src/apprt/gtk.zig @@ -1171,6 +1171,9 @@ pub const Surface = struct { // If the key is tab, we say we handled it because we don't want // tab to move focus from our surface. c.GDK_KEY_Tab => 1, + // We do the same for up, because that steals focus from the surface, + // in case we have multiple tabs open. + c.GDK_KEY_Up => 1, else => 0, };