[PATCH 1/2] cairo-util: Add frame_touch_motion support

Boyan Ding stu_dby at 126.com
Tue May 13 03:14:39 PDT 2014


Hi Jason,

In writing v2 of the patches I found out frame_touch_motion 
isn't that easy as it seems. For there's something tricky.

Without frame_touch_motion the code actually works all right - finger
down on a button presses the button and finger up releases it,
regardless of where the finger has gone.

However, if frame_touch_motion is implemented, I think the 
behavior might be changed to this - finger down presses 
the button; once the finger leave the button, the press should be
cancelled and if the finger enters the region of another button we'll
just act as if we "hover" above the button.

If it is implemented like that, we'll have to change the 
frame_touch structure to add a field that keep track of which 
button we hover on, just like hover_button in frame_pointer.

I'll also add a frame_touch_cancel function, it seems not
that hard. Just scan the list of touches and take appropriate 
actions (cancel button, destroy touch) will do.

I wonder whether my ideas are appropriate.

Regards,
Boyan Ding




More information about the wayland-devel mailing list