mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-17 22:05:22 -05:00
term: don't send mouse events if shift is being pressed
This commit is contained in:
parent
28a8b18c5e
commit
14d4a0a1c6
1 changed files with 15 additions and 0 deletions
15
terminal.c
15
terminal.c
|
|
@ -470,6 +470,11 @@ void
|
|||
term_mouse_down(struct terminal *term, int button, int row, int col,
|
||||
bool shift, bool alt, bool ctrl)
|
||||
{
|
||||
if (term->kbd.shift) {
|
||||
/* "raw" mouse mode */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Map libevent button event code to X button number */
|
||||
int xbutton = linux_mouse_button_to_x(button);
|
||||
if (xbutton == -1)
|
||||
|
|
@ -498,6 +503,11 @@ void
|
|||
term_mouse_up(struct terminal *term, int button, int row, int col,
|
||||
bool shift, bool alt, bool ctrl)
|
||||
{
|
||||
if (term->kbd.shift) {
|
||||
/* "raw" mouse mode */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Map libevent button event code to X button number */
|
||||
int xbutton = linux_mouse_button_to_x(button);
|
||||
if (xbutton == -1)
|
||||
|
|
@ -531,6 +541,11 @@ void
|
|||
term_mouse_motion(struct terminal *term, int button, int row, int col,
|
||||
bool shift, bool alt, bool ctrl)
|
||||
{
|
||||
if (term->kbd.shift) {
|
||||
/* "raw" mouse mode */
|
||||
return;
|
||||
}
|
||||
|
||||
int encoded = 0;
|
||||
|
||||
if (button != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue