GNU bug report logs - #68796
xterm.c: Convert mouse-4/5/6/7 to wheel-up/down/left/right

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 29 Jan 2024 14:46:01 UTC

Severity: wishlist

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 68796 <at> debbugs.gnu.org
Subject: bug#68796: xterm.c: Convert mouse-4/5/6/7 to wheel-up/down/left/right
Date: Mon, 04 Mar 2024 09:47:54 +0800
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Ping?
>
> I believe this patch should be much less controversial since it allows
> users to get the old behavior back and still keeps the same semantics
> for existing `mouse-wheel-*-event` variables in case some other code
> still generates such events.  It's basically a half-way step between
> what I proposed at first and the status quot.
>
> But I'd like some confirmation that you think it's acceptable, and maybe
> if you could comment on the FIXME included in there (I needed it for
> clicks on the tab-bar, but I don't understand that code).

That would be simple if I could find the FIXME, but it doesn't appear to
be present anywhere in that patch...

>> +  /* Convert pre-XInput2 wheel events represented as mouse-clicks.  */
>> +  if (!xi2)
>> +    {
>> +      Lisp_Object base
>> +        = Fcdr_safe (Fassq (make_fixnum (result->code + 1),
>> +                            Fsymbol_value (Qmouse_wheel_buttons)));
>> +      int wheel
>> +        = NILP (base) ? -1
>> +          : BASE_EQ (base, Qwheel_down)  ? 0
>> +          : BASE_EQ (base, Qwheel_up)    ? 1
>> +          : BASE_EQ (base, Qwheel_left)  ? 2
>> +          : BASE_EQ (base, Qwheel_right) ? 3
>> +          : -1;

This should be surrounded by parentheses.

Thanks.




This bug report was last modified 1 year and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.