From: Jiri Slaby <jirislaby@kernel.org>
To: Tammo Block <tammo.block@gmail.com>, linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v0 2/5] Make it possible to enable/disable SRG mouse reporting
Date: Fri, 26 Jun 2020 12:43:21 +0200 [thread overview]
Message-ID: <8e75c573-c66d-f79b-ad09-bbac280a5c91@kernel.org> (raw)
In-Reply-To: <d0951dcf5fb4cf8bfa19940953bce55ad0ee0510.1593155911.git.tammo.block@gmail.com>
On 26. 06. 20, 9:22, Tammo Block wrote:
> 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;
So simply:
vc->vc_proto_mouse = on_off;
The others could be "on_off * TIOCL_XXX", but I don't think it would
improve anything.
thanks,
--
js
suse labs
next prev parent reply other threads:[~2020-06-26 10:43 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 ` [PATCH v0 2/5] Make it possible to enable/disable " Tammo Block
2020-06-26 10:43 ` Jiri Slaby [this message]
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=8e75c573-c66d-f79b-ad09-bbac280a5c91@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tammo.block@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).