[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 101bbd1392: Add support for pinch gestures to the XI2 build
From: |
Eli Zaretskii |
Subject: |
Re: master 101bbd1392: Add support for pinch gestures to the XI2 build |
Date: |
Sun, 26 Dec 2021 12:31:12 +0200 |
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sun, 26 Dec 2021 18:03:31 +0800
>
> > And I think this kind of event is too high-level. Usually, pinch
> > (a.k.a. "zoom") gestures and rotation gestures are reported
> > separately, because they have different semantics and will probably
> > have different command bindings. Why should be lump them together?
> > Moreover, in the corresponding command you require that the rotation
> > angle be zero, something that will be hard on the users, I think.
>
> XInput doesn't yet have support for reporting rotation gestures; the
> angle here is only reported as part of a pinch sequence, and pinch
> sequence only started when actual pinching occurs.
Yes, but you could generate several Emacs events in make_lispy_event,
can't you? Or maybe simply ignore the angle data?
> > We could potentially be flooded with input messages, and the question
> > is whether the above command should process all the pending events of
> > this time at once? If it should, perhaps keyboard.c should fetch all
> > the consecutive pinch events and produce a single event out of it, or
> > at least produce a structure that supplies all the events as one form
> > to the application level?
>
> > At least for text-scale, I think you will have a lot of unpleasant
> > flickering if you process each event separately.
>
> I didn't notice that, but it's because we round the result of the
> scaling. I will try to fix this, thanks.
>
> However, I think TRT here is not for keyboard.c to "coalesce" these
> events: the best approach would probably be to use `read-event' inside
> individual user commands with a timeout. That way, the commands
> themselves get to decide the granularity of the gestures they receive.
I don't think I understand how read-event with a timeout will help
here: you still get a series of events, AFAIU.
Besides, I think doing such processing in Lisp is not the best way,
because the facilities are quite crude and not meant for doing this.
Walking the event queue looking a for a series of pinch events is much
easier.
> > Finally, as this is a user command, we should start documenting such
> > commands in the user manual.
>
> Thanks, where would you prefer to put it?
In "Text Scale", I guess (which currently doesn't document
mouse-wheel-text-scale, which it should).
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Eli Zaretskii, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Po Lu, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build,
Eli Zaretskii <=
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Po Lu, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Eli Zaretskii, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Po Lu, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Eli Zaretskii, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Po Lu, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Po Lu, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Eli Zaretskii, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Po Lu, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Eli Zaretskii, 2021/12/26
- Re: master 101bbd1392: Add support for pinch gestures to the XI2 build, Po Lu, 2021/12/26