protocol questions

Thiago Macieira thiago.macieira at intel.com
Sat Mar 30 09:55:01 PDT 2013


On sábado, 30 de março de 2013 09.34.24, Matthias Clasen wrote:
> >> - Various input events have a time field. The spec doesn't really say
> >> anything about this. What is it good for, and what units are these -
> >> monotonic time ?
> > 
> > Monotonic (ideally) time in an undefined domain, i.e. they're only
> > meaningful on relation to each other.
> 
> What can you do with them ? For the use case that Giulio mentioned
> (double-click detection), I'd need to know at least if the difference
> between two times is seconds or milliseconds or microseconds...

The protocol needs to specify the unit. It can't be dependent on the device 
driver, that makes no sense. If it's in milliseconds, it will overflow every 
49.7 days. If it's microseconds, it will overflow every 71.6 minutes.

It also needs to specify which timestamps are in the same time domain. Can two 
timestamps be compared to each other only if:

 - they are in the same input device (same mouse, same keyboard), but not 
across devices
 - they are in the same seat, but not across seats
 - they are in input event messages, but not other types of messages that 
carry timestamps
 - no restriction

For example, imagine the case of trying to ensure that a Ctrl key was pressed 
before a mouse click happened, after the events were plucked out of the event 
stream.

Or is there another, recommended way of doing that, such as by using the 
serials?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130330/ecc09f3a/attachment.pgp>


More information about the wayland-devel mailing list