[PATCH] Wayland: Add wl_pointer.buttons_update()

Bill Spitzak spitzak at gmail.com
Mon Jun 10 12:52:11 PDT 2013


Are you really saying the event is "these are the buttons that have 
changed state since you last got an event?". That seems a nightmare for 
the compositor to keep track of (it has to remember the last button 
state for every client).

If instead this is just a report of the current state, then the array 
entry descriptions need some renaming to remove the "have been" from 
their name.

However it seems a lot better to send a much smaller array of the button 
indexes that are currently pressed. Then the really interesting "no 
buttons are pressed" state is a zero-length array.

If it is changed like this it would be really useful to also send it 
after a release event if there are no buttons pushed. This is to fix 
errors where the client or compositor get out of sync with press/release 
events.

Martin Minarik wrote:

> +      </description>
> +      <entry name="released" value="0" summary="the buttons have been released"/>
> +      <entry name="pressed" value="1" summary="the buttons have been clicked"/>
> +    </enum>

Recommend wording change:

     <entry name="released" value="0" summary="the button is released"/>
     <entry name="pressed" value="1" summary="the button is pressed"/>


More information about the wayland-devel mailing list