mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
input: clean up mouse scroll handling
* Allow scrolling on the normal (non-alt) screen, when application is
grabbing the mouse (when user presses Shift).
* Use term_mouse_grabbed() instead of explicitly checking for
MOUSE_NONE tracking.
* Remove mouse tracking check from cmd_scrollback_{up,down}. Caller is
expected to have done the check.
* Don’t scroll down on mouse wheel tilt events.
This commit is contained in:
parent
3413901678
commit
0900d01ec9
2 changed files with 21 additions and 14 deletions
|
|
@ -18,9 +18,6 @@ cmd_scrollback_up(struct terminal *term, int rows)
|
|||
if (urls_mode_is_active(term))
|
||||
return;
|
||||
|
||||
if (term->mouse_tracking != MOUSE_NONE)
|
||||
return;
|
||||
|
||||
rows = min(rows, term->rows);
|
||||
xassert(term->grid->offset >= 0);
|
||||
|
||||
|
|
@ -98,9 +95,6 @@ cmd_scrollback_down(struct terminal *term, int rows)
|
|||
if (urls_mode_is_active(term))
|
||||
return;
|
||||
|
||||
if (term->mouse_tracking != MOUSE_NONE)
|
||||
return;
|
||||
|
||||
if (term->grid->view == term->grid->offset)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue