mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05:00
term: "raw" mouse mode requires shift only to be pressed
This commit is contained in:
parent
90bfcc1fbd
commit
62ed0ef4f2
1 changed files with 12 additions and 3 deletions
15
terminal.c
15
terminal.c
|
|
@ -1313,7 +1313,10 @@ void
|
|||
term_mouse_down(struct terminal *term, int button, int row, int col,
|
||||
bool shift, bool alt, bool ctrl)
|
||||
{
|
||||
if (term->wl->kbd.shift) {
|
||||
if (term->wl->focused == term &&
|
||||
term->wl->kbd.shift &&
|
||||
!term->wl->kbd.alt && !term->wl->kbd.ctrl && !term->wl->kbd.meta)
|
||||
{
|
||||
/* "raw" mouse mode */
|
||||
return;
|
||||
}
|
||||
|
|
@ -1350,7 +1353,10 @@ void
|
|||
term_mouse_up(struct terminal *term, int button, int row, int col,
|
||||
bool shift, bool alt, bool ctrl)
|
||||
{
|
||||
if (term->wl->kbd.shift) {
|
||||
if (term->wl->focused == term &&
|
||||
term->wl->kbd.shift &&
|
||||
!term->wl->kbd.alt && !term->wl->kbd.ctrl && !term->wl->kbd.meta)
|
||||
{
|
||||
/* "raw" mouse mode */
|
||||
return;
|
||||
}
|
||||
|
|
@ -1392,7 +1398,10 @@ void
|
|||
term_mouse_motion(struct terminal *term, int button, int row, int col,
|
||||
bool shift, bool alt, bool ctrl)
|
||||
{
|
||||
if (term->wl->kbd.shift) {
|
||||
if (term->wl->focused == term &&
|
||||
term->wl->kbd.shift &&
|
||||
!term->wl->kbd.alt && !term->wl->kbd.ctrl && !term->wl->kbd.meta)
|
||||
{
|
||||
/* "raw" mouse mode */
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue