From 6ee4eda1ea801c7f2217a77d0fa08fbd023f6083 Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Sun, 3 Dec 2023 12:00:22 -0300 Subject: [PATCH] TerminalWidget: stop scroll controller when keyboard focus is lost When the view lost keyboard focus by activating the search action, we stop reciving key releases in the view's key controller, letting the scroll controller activated. That was making the terminal zoom in/out instead of scrolling in this case. --- src/Widgets/TerminalWidget.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Widgets/TerminalWidget.vala b/src/Widgets/TerminalWidget.vala index 27f7a27592..d9e431f978 100644 --- a/src/Widgets/TerminalWidget.vala +++ b/src/Widgets/TerminalWidget.vala @@ -204,6 +204,7 @@ namespace Terminal { }; key_controller.key_pressed.connect (key_pressed); key_controller.key_released.connect (() => scroll_controller.flags = NONE); + key_controller.focus_out.connect (() => scroll_controller.flags = NONE); // XXX(Gtk3): This is used to stop the key_pressed() handler from breaking the copy last output action, // when a modifier is pressed, since it won't be in the modifier mask there (neither here).