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 `<Tab>` so now we do the
same thing for `<Up>`: we tell the `GtkApplication` we handled the event
so it doesn't propagate any further.
This commit is contained in:
Thorsten Ball
2023-08-09 20:08:47 +02:00
parent 2c140b5a22
commit 147d5b0f3e

View File

@ -1171,6 +1171,9 @@ pub const Surface = struct {
// If the key is tab, we say we handled it because we don't want // If the key is tab, we say we handled it because we don't want
// tab to move focus from our surface. // tab to move focus from our surface.
c.GDK_KEY_Tab => 1, 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, else => 0,
}; };