On 01/02/2012 03:29 PM, Peter Hutterer wrote: > Toolkits need to know which touch event emulated a pointer event and which > ones do not. To quote Carlos Garnacho: > > GTK+ does client-side windows by default (GdkWindows without a backing X > window), for this to work the toplevel window in the client needs to > select for more events that it wouldn't normally select for in order to > cater for the event masks in such child "windows". This means that > ideally GTK+ should set the touch events mask in the toplevel, and then > find out whether the "window" would receive pointer or touch events for > the sequence emulating the pointer, and perform the emulation itself. > > Reported-by: Carlos Garnacho <[email protected]> > Signed-off-by: Peter Hutterer <[email protected]> > --- > IIRC we did discuss this months ago and decided not to set the flag but the > above use-case cannot easily be solved right now. Adding this flag in the > server is simple enough. > > XI2.h | 1 + > specs/XI2proto.txt | 8 ++++++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/XI2.h b/XI2.h > index 4368006..e864b06 100644 > --- a/XI2.h > +++ b/XI2.h > @@ -158,6 +158,7 @@ > #define XIPointerEmulated (1 << 16) > /* Device event flags (touch events only) */ > #define XITouchPendingEnd (1 << 16) > +#define XITouchEmulatingPointer (1 << 17)
Is this easier than having a dual-purpose XIPointerEmulated flag? We would have to push XITouchPendingEnd to the 17th bit, but an ABI break right now isn't too bad. Or, do you have a specific reason why we shouldn't reuse the flag? (Cc'd Carlos in case he has a preference.) -- Chase _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
