[X11] Question about TouchCancel event like ACTION_CANCEL in android

Peter Hutterer peter.hutterer at who-t.net
Thu Apr 16 00:38:18 PDT 2015


On Thu, Apr 16, 2015 at 03:50:41PM +0900, ������ wrote:
> Hello, Peter Hutterer.
> 
> I¡¯m planning to add a ¡°Event cancel¡±(Touch Cancel?) event in x11
> protocol.
> 
> Like below article I want to send a event to apps for notification about
> current events are canceled!.
> 
>  
> 
> How/What I doing for this job?
> 
> I need your advise. Please give me your help.

what's the use-case you're trying to solve? many use-cases for cancel can be
solved with the touch ownership approach, the remaining ones may be a valid
justification but you'll be running into the issue that no application
currently supports cancel so if you do add this you can only add it to the
TouchEnd. and most applications will think it's a normal touch release and
proceed as normal.

Cheers,
   Peter

> 
> From: °­Á¤Çö [mailto:jhyuni.kang at samsung.com] 
> Sent: Wednesday, April 15, 2015 7:39 PM
> To: 'xorg-devel at lists.x.org'
> Subject: [X11] Question about TouchCancel event like ACTION_CANCEL in
> android
> 
>  
> 
> Hello, Dears.
> 
> I send this email again. Because of HTML (not text)
> 
>  
> 
> I'm planning to add a touch cancel event(like ACTION_CANCEL in Android) in
> X11 protocol.
> 
>  
> 
> So I invested XI events and I found a variable named "flags" in DeviceEvent
> structure.
> 
> The "flags" variable can get values like below.
> 
>  
> 
> ==========================================================
> 
> (defined in XI2.h)
> 
> /* Device event flags (common) */
> 
> /* Device event flags (key events only) */
> 
> #define XIKeyRepeat                             (1 << 16)
> 
> /* Device event flags (pointer events only) */
> 
> #define XIPointerEmulated                       (1 << 16)
> 
> /* Device event flags (touch events only) */
> 
> #define XITouchPendingEnd                       (1 << 16)
> 
> #define XITouchEmulatingPointer                 (1 << 17)
> 
> ==========================================================
> 
>  
> 
> So I think how about insert "Device event flags" for a touch cancel event
> like below.
> 
> #define XITouchCancel  (1 << 18)
> 
> or
> 
> #define XIPointerCancel (1 << 18)
> 
> we can distinguish Normal touch events and a touch cancel event using
> XITouchCancel definition.
> 
>  
> 
> Another way is make new events: struct TouchCancelEvent( have a type
> "XI_TouchCancel")
> 
>  
> 
> Each method has its advantages and disadvantages.
> 
>  
> 
> So I hope to hear opinions.
> 
> Would you give me some advice or opinion?
> 
>  
> 
> I will wait your reply.
> 
> Best regards,
> 
> Jeonghyun Kang.
> 
>  
> 


More information about the xorg-devel mailing list