On Tue, 9 Sep 2014 10:11:51 +0000
"Zhang, Xiong Y" <[email protected]> wrote:

> > > > Signed-off-by: Xiong Zhang <[email protected]>
> > > ---
> > >  clients/window.c    | 26 ++++++++++++++++++++++++--
> > >  shared/cairo-util.h |  7 +++++++
> > >  shared/frame.c      | 49 
> > > +++++++++++++++++++++++++++++++++++++++++++++++++
> > >  3 files changed, 80 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/clients/window.c b/clients/window.c index 
> > > 7c9c518..a608a84 100644
> > > --- a/clients/window.c
> > > +++ b/clients/window.c
> > > @@ -363,6 +363,7 @@ struct window_frame {
> > >
> > >       uint32_t last_time;
> > >       uint32_t did_double, double_click;
> > > +     int32_t last_id, double_id;
> > >  };
> > >
> > >  struct menu {
> > > @@ -2380,7 +2381,23 @@ frame_touch_down_handler(struct widget 
> > > *widget, struct input *input,  {
> > >       struct window_frame *frame = data;
> > >
> > > -     frame_touch_down(frame->frame, input, id, x, y);
> > > +     frame->double_click = 0;
> > > +     if (time - frame->last_time <= DOUBLE_CLICK_PERIOD &&
> > > +         frame->last_id == id) {
> > > +             frame->double_click = 1;
> > > +             frame->did_double = 1;
> > > +             frame->double_id = id;
> > > +     } else
> > > +             frame->did_double = 0;
> > > +
> > > +     frame->last_time = time;
> > > +     frame->last_id = id;
> > > +
> > > +     if (frame->double_click)
> > > +             frame_double_touch_down(frame->frame, input, id, x, y);
> > > +     else
> > > +             frame_touch_down(frame->frame, input, id, x, y);
> > > +
> > >       frame_handle_status(frame, input, time, 
> > > THEME_LOCATION_CLIENT_AREA);
> > 
> > >Hi,
> > 
> > >hmm, should this perhaps be restricted to the case, where you start 
> > >with no touches down, then one touch id does down-up, then again 
> > >down-up, and only interpret that as a double-touch?
> > 
> > In order to support multi touch, I didn't do this restriction.
> > 
> > >With your current code, isn't is possible to keep, say, one finger 
> > >down while double-touching with another finger? Is that intended?
> > >Thanks,
> > >pq
> > 
> > It is my intend to keep one finger down while double-touching with another 
> > finger.
> > So that we can operate with both hands and support multi touch.
> 
> >But touch points are never independent, are they?
> >Doesn't putting one finger down take an implicit grab, which causes all 
> >additional fingers to be restricted to the 
> >surface with the grab?
> Yes, I agree with you.
> 
> >You cannot distinguish left hand from right, fingers all create just 
> >arbitrary touch points.
> 
> >In src/input.c it is written around line 1523:
> >             /* the first finger down picks the view, and all further go
> >              * to that view for the remainder of the touch session i.e.
> >              * until all touch points are up again. */
> 
> >So that means that you cannot hold a finger down on one window, and then 
> >double-tap another window.
> So this means that all touch points must be in one window in order to support 
> multi touch. Weston have given us such limitation.
> 
> >Does it really make sense to be able to hold one finger down on the same 
> >window, and double-tap with another?
> 
> >If I hold a finger down on the window, can I usually use another finger to 
> >push button widgets on the same
> >window? By "usually" I mean in whatever touch interfaces there are on the 
> >market / in the wild.
> In a virtual key board, one finger could hold Shift key and another finger 
> could single or double touch other key to enter capital like physical key 
> board.
> 

I guess it might make sense in that case. However, here we are talking
about maximizing a window. When you maximize a window, everything tends
to move, which means that the things that were under the existing touch
points are no longer there.

> >How would you distinguish a "left thumb down on something, drag & drop 
> >something else with right index 
> >finger" from the "zoom pinch gesture"?
> 
> If all touch points are in one window at the same time, each touch point has 
> a unique touch ID. Using this ID, APP could identify them. Left thumb's drog 
> & dorp and Right index finger 's zoom gesture are independent.
> 

The ID does not identify the finger or hand. On touch-down, an
arbitrary ID is allocated regardless of what is touching the screen,
and on touch-up the ID is released for re-use. Therefore the pinch
gesture is indistinguishable from two simultaneous unrelated touches
without some additional context information.

> My current code is compatible with your proposal restriction, and it could 
> also add multi touch support in one window.

Okay, judging from comments here and elsewhere, it seems everything
goes with touch user interfaces.

So if no-one objects, this one is queued for 1.7.


Thanks,
pq
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to