Skip to content

Commit

Permalink
TerminalWidget: Stop Scroll Controller When Keyboard Focus is Lost (#750
Browse files Browse the repository at this point in the history
)

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.
  • Loading branch information
Marukesu authored Dec 3, 2023
1 parent beabb94 commit b919529
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Widgets/TerminalWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit b919529

Please sign in to comment.