From: Tammo Block <tammo.block@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>
Subject: [PATCH v0 2/5] Make it possible to enable/disable SRG mouse reporting
Date: Fri, 26 Jun 2020 09:22:24 +0200 [thread overview]
Message-ID: <d0951dcf5fb4cf8bfa19940953bce55ad0ee0510.1593155911.git.tammo.block@gmail.com> (raw)
In-Reply-To: <cover.1593155911.git.tammo.block@gmail.com>
The report protocol stored in vc_report_mouse is not a bitmask, the
protocols are mutually exclusive, last one wins. Values are chosen to
maximize compatibility.
Signed-off-by: Tammo Block <tammo.block@gmail.com>
---
drivers/tty/vt/vt.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 48a8199f7845..d52ac57034e0 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1890,13 +1890,22 @@ static void set_mode(struct vc_data *vc, int on_off)
clr_kbd(vc, decarm);
break;
case 9:
- vc->vc_report_mouse = on_off ? 1 : 0;
+ vc->vc_report_mouse = on_off ? TIOCL_REPORTBTNPRESS : 0;
break;
case 25: /* Cursor on/off */
vc->vc_deccm = on_off;
break;
case 1000:
- vc->vc_report_mouse = on_off ? 2 : 0;
+ vc->vc_report_mouse = on_off ? TIOCL_REPORTRELEASE : 0;
+ break;
+ case 1002:
+ vc->vc_report_mouse = on_off ? TIOCL_REPORTDRAG : 0;
+ break;
+ case 1003:
+ vc->vc_report_mouse = on_off ? TIOCL_REPORTANYMOVE : 0;
+ break;
+ case 1006:
+ vc->vc_proto_mouse = on_off ? 1 : 0;
break;
}
} else {
--
2.27.0
next prev parent reply other threads:[~2020-06-26 7:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 7:21 [PATCH v0 0/5] vt: Add SRG mouse reporting features Tammo Block
2020-06-26 7:22 ` [PATCH v0 1/5] Change/add data structures for SRG mouse reporting Tammo Block
2020-06-26 10:38 ` Jiri Slaby
2020-06-26 7:22 ` Tammo Block [this message]
2020-06-26 10:43 ` [PATCH v0 2/5] Make it possible to enable/disable " Jiri Slaby
2020-06-26 7:22 ` [PATCH v0 3/5] Check for SRG protocol and move bit masking Tammo Block
2020-06-26 7:23 ` [PATCH v0 4/5] Add support for SRG report output format Tammo Block
2020-06-26 10:52 ` Jiri Slaby
2020-06-26 7:23 ` [PATCH v0 5/5] Add Documentation for console mouse reporting Tammo Block
2020-06-26 11:00 ` Jiri Slaby
2020-06-26 17:55 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0951dcf5fb4cf8bfa19940953bce55ad0ee0510.1593155911.git.tammo.block@gmail.com \
--to=tammo.block@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®