Re: mouse or touch event flood



On 01/03/13 12:31, Gyorgy Kovesdi wrote:
Hi,

I sent mail some days ago because my screen sometimes blinks (or remains dark) on my embedded device 
(Beagleboard + Angstrom Linux) when the screen is touched.
I found the reason: the touchscreen driver emits events too frequently, so it floods the system by touch 
events which cannot be processed fast enough.
I modified the driver to limit the event frequency, which resolved the problem. However, sometimes (rarely 
enough) i get a screen blink yet. Sometimes
the update event is followed by a release immediately, when the release event is dropped, leaving the 
corresponding button stucked. How can i avoid
this situation?

Is the screen blink a feature or a bug? If it is a feature, how can i avoid it?

Regards
György Kövesdi

How much is too much? I mean the driver shouldn't send events if the touch points are not moving/changing in some ways. And if the touch points are moving your system should be able to handle that load (really it's not THAT much). One trick though is to avoid the picking for every single event. You can use the clutter_stage_set_motion_events_enabled() function like the ClutterDragAction uses it, to avoid capture/bubble event processing phases if you already know that only one widget is interested in a particular motion event, or use a grab with clutter_input_device_sequence_grab().

A TOUCH_UPDATE sequence should end with a TOUCH_END/TOUCH_CANCEL event, not a RELEASE event. Your widget then needs to track which input sequence/pointer it's interested in, and bail out anything that isn't relevant (but that's toolkit logic). You can have a look at Mx, I think we implemented part of that logic (at least for the MxButton).

In general Blinking screen is not a feature, but I can't tell if you're doing something wrong. It is certainly not a Clutter behavior.

Regards,

-
Lionel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]