[PATCH wayland] protocol: Add pointer gestures (swipe/pinch) protocol

Carlos Garnacho carlosg at gnome.org
Thu Jul 16 11:17:44 PDT 2015


Hey Jonas :),

On Thu, Jul 16, 2015 at 3:15 AM, Jonas Ã…dahl <jadahl at gmail.com> wrote:
> On Wed, Jul 15, 2015 at 08:02:10PM +0200, Carlos Garnacho wrote:
>> The lifetime and progress of gestures is maintained by the separate
>> wl_pointer_gesture_pinch and wl_pointer_gesture_swipe interfaces,
>> each of these has begin/update(optional)/end phases, as transmitted
>> by their events.
>>
>> The gesture interfaces can be obtained from the wl_pointer, and
>> must be interpreted on the last surface entered by the pointer,
>> starting from the pointer coordinates.
>
> Without having looked at the protocol details, did you consider whether
> we should put this in weston first, as done with other non-trivial
> protocol extensions (like wl_subcompositor, wl_relative_pointer,
> wl_scalar, wl_text_input etc)? It might sure it should belong in
> wl_pointer as well. We should try to avoid putting things in the core
> objects when it doesn't make perfect sense, and in this case, I think
> adding it as an optional extension seems reasonable.

Peter actually started out like that, with the pinch/gesture
interfaces being taken from a wl_gestures global. I'm not opposed to
the idea, but the extra indirection between pointer event handling and
a global that's just loosely related to the seat struck as weird to me
when getting my hands in the code, hence the early short-circuit into
wl_pointer.

Convenience-wise, I'm concerned about having to support multiple
versions/namespaces of the protocol if we start out like that and this
is deemed part of wayland.xml someday in a later future. Although if
it does help on an early adoption, sure...

Cheers,
  Carlos


More information about the wayland-devel mailing list