[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Wayland - Beyond X (The H)

Wayland - Beyond X (The H)

Posted Feb 14, 2012 22:24 UTC (Tue) by dlang (guest, #313)
In reply to: Wayland - Beyond X (The H) by farnz
Parent article: Wayland - Beyond X (The H)

I understand that X supports multiple mice on a screen, and I've seen stuff recently about it supporting multitouch as well.


to post comments

Wayland - Beyond X (The H)

Posted Feb 14, 2012 23:11 UTC (Tue) by farnz (subscriber, #17727) [Link] (2 responses)

It has some deep seated issues around the way multiple mice and multitouch interact with "traditional" X clients - if we could just assume that all X applications will be rewritten to assume multitouch support, we could get rid of a decent collection of interesting special cases.

There are at least three cases that XI2 just can't get right when interacting with traditional X clients:

  1. When I have multiple simultaneous touch points, where is the "correct" location for the emulated single touch? There's no right answer for this - it could be one or more of the individual touch points, or it could be the position of the cursor, or it could be an average of the locations of the touch points. Exactly which one is right is a function of the underlying UI, which X can't see into.
  2. If the user does a "global" gesture, you need to tell the client "I know I've been feeding you motion and touch events, but actually, they've turned out to be a global gesture. You need to forget that they happened". The alternative is to not send the events at all until touch up - painful if you're trying to drag an icon.
  3. With multiple input devices, how do I synthesise the single mouse that a traditional X client expects? Whatever I do is going to fail in some corner cases - either there will be button events that don't correspond to your expectations (e.g. because I simply serialised two mice worth of events into one stream, and mouse one was trying to drag an icon when mouse 2 came in and double-clicked a different icon), or there will be a lack of events when you expected some (e.g. because mouse 1 is lurking over a window, but you've moved mouse 2 over it as well, and have forgotten about mouse 1).

Wayland - Beyond X (The H)

Posted Feb 14, 2012 23:38 UTC (Tue) by khc (guest, #45209) [Link] (1 responses)

Curious comment from a bystander, how does wayland plan to address these issues? Specifically 1) and 2).

Wayland - Beyond X (The H)

Posted Feb 15, 2012 12:15 UTC (Wed) by farnz (subscriber, #17727) [Link]

Wayland's way of addressing them is simple - it doesn't have a historic protocol to worry about, so it can assume that you are multitouch aware. It handles them the same way XI2 does when dealing with XI2 clients.

Specifically addressing the three points I made earlier:

  1. When you have multiple touch points, Wayland reports all the touch points individually, including their locations, and the client is expected to work out what that means. For example, it could highlight a button if any of the touch points are within that button, if that's appropriate for this client.
  2. Touch event streams are terminated with either a "touch complete - go process" or "actually, that was the beginning of a global gesture - ignore it" event. This lets applications provide feedback to the user as the touch happens (e.g. drag pointer instead of normal pointer), but delay taking action until the touch completes.
  3. You get events from each input device individually, so the client can distinguish event streams from multiple mice.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds