Commit graph

285 commits

Author SHA1 Message Date
Chase Douglas
79c22a2e7b Fix indentation of active_touches definition
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-24 19:03:28 -07:00
Chase Douglas
cec253561a Introduce Touch grab mode
Touch grabs are not really synchronous nor asynchronous. Use a separate
grab mode value for touch grabs, just to make the protocol seem more
sane.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-24 19:02:27 -07:00
Peter Hutterer
1cb0043358 DeviceEvents: a TouchPendingEnd won't generate further TouchUpdate events
Update, not motion.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:58:31 -07:00
Peter Hutterer
b025106fe8 DeviceEvent: active_touches needs marker that it's XI 2.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:58:26 -07:00
Peter Hutterer
f469fa99ae AllowTouchEvents can take any device id, not just slaves
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:58:21 -07:00
Peter Hutterer
d7fd289ee0 Indent Ownership explanation for consistent formatting
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:58:16 -07:00
Peter Hutterer
e51dd1b6bd Reword the passive touch grab rules to be similar to the others
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:58:11 -07:00
Peter Hutterer
67e06b8f14 Fix missing 'and' in GrabTypeFocusIn description
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:58:06 -07:00
Peter Hutterer
5b8a8bd0b4 XISelectEvents: BadValue is generated, not returned
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:58:00 -07:00
Peter Hutterer
ae6ba6b37e Coordinates are always absolute, no need to re-state it
Coordinates in DeviceEvents are always absolute, regardless of the axis
mode. The same is true for touch events, stating it again here just adds to
the confusion.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:57:53 -07:00
Peter Hutterer
544ce0cee3 Add two linebreaks for asciidoc list parsing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:57:45 -07:00
Peter Hutterer
9e46dd3589 Changing the touch device mode generates a DeviceChangedEvent
State it explicitly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:57:35 -07:00
Peter Hutterer
1b0c016d1f XITouchClass' props needs a num_props
In XI2 requests, the length field isn't enough to determine the number of
elements since it may vary in future versions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-23 17:57:08 -07:00
Chase Douglas
4adfb5ad6c Specify dependent device pointer/touch handling
With the added rules, trackpads should be manageable no matter what
occurs (button presses and pointer motion). Gesture and touch semantics
during these actions are not well defined, and cancelling touches cleans
up the protocol and implementation.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05 15:55:13 -07:00
Chase Douglas
29cd8aac67 Use the same valuator axes for pointer and touch events
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05 15:55:13 -07:00
Chase Douglas
b5e357c76d Remove touch "Observe" grabs
The semantics of these grabs doesn't work for all use cases. Raw touch
events will likely work better.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05 15:55:13 -07:00
Chase Douglas
3172e3c52e Fix up pointer event emulation section
* Wording cleanups for tense and to make some sentences flow better.
* Upon further review, it does seem to make more sense to deliver
  emulated pointer events through the same slave device rather than the
  master device. Thus, slave devices (including floating devices) may
  emit emulated pointer events.
* Peter is correct, it doesn't make sense to set the PointerEmulated
  flag on touch events.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05 14:45:34 -07:00
Chase Douglas
b15ad6e0dc Peter is right, floating devices can emit touch events
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05 14:44:29 -07:00
Chase Douglas
951cb83143 Prettyify touch device types
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05 14:44:29 -07:00
Chase Douglas
45387042f8 Update device type terminology
Remove IndepedentTouch and SemiMultitouch devices. These may be handled
in an implementation specific manner through the props array of ATOMs in
the touch class information.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-05 14:44:20 -07:00
Chase Douglas
3a2f149b33 Yes, send TouchEnd to owner, TouchPendingEnd to other listeners
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-02 15:24:48 -07:00
Chase Douglas
343fd69945 Separate "XI2.x" into "XI 2.x" for readability
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-08-02 15:24:28 -07:00
Chase Douglas
3cbc9b68a3 Merge remote-tracking branch 'origin/master' into multitouch
Conflicts:
	XI2.h
2011-08-02 14:09:11 -07:00
Peter Hutterer
2ba875f4f2 Put a warning in about not adding any further libXi defines
The matching commit in libXi is
    e8531dd6a981c6cf19a1d256c29e886e34e8f51a
    libXi-1.4.2-21-ge8531ddp

    Add XI2 library-internal array offsets to XIint.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-08-02 10:21:52 +10:00
Peter Hutterer
ee91dcda46 specs: add a linebreak for asciidoc parsing
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-06-23 09:54:20 +10:00
Peter Hutterer
2cd2adb7a4 Provide convenience defines for owner_events.
No functional effect, just to improve readability of code.

It's not obvious what "True" or "False" stands for in a function with 11
arguments. Compare
    XIGrabButton(dpy, deviceid, button, grab_window, cursor,
                 GrabModeAsync, GrabModeSync, True,
                 event_mask, num_modifiers, &modifiers);

vs.

XIGrabButton(dpy, deviceid, button, grab_window, cursor,
             GrabModeAsync, GrabModeSync, XIOwnerEvents,
             event_mask, num_modifiers, &modifiers);

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-06-07 09:23:38 +10:00
Peter Hutterer
bef7648827 Add XI2-specific defines for grab and property requests
XI 2.0 headers forced clients to mix XI2 specific constants with defines for
core input. Most notable here are the grab code which required GrabModeAsync
or GrabModeSync from core, but _not_ AnyModifier (XIAnymodifier !=
AnyModifier). This is a hard-to-debug cause for bugs.

Add defines for grab modes, grab return codes and property modes as well as
a define for the AnyPropertyType. These defines are identical to the ones
defined in core but stop the use of input-related defines from either core
or XI 1.x.

Clients must use the core defines None and CurrentTime where applicable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-06-07 09:22:58 +10:00
Daniel Stone
d331251884 Clean up and reword multitouch ownership/emulation
Remove 'withheld' indirect section as well.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-05-03 18:44:53 +01:00
Daniel Stone
f17598c1be Mostly typographical
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-05-03 17:21:44 +01:00
Daniel Stone
2d5294cb0b Further cleanups and clarifications
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-04-28 12:02:43 +01:00
Daniel Stone
7579069170 Reword touch introduction, labels for all
Reword the introduction to the multitouch section to try to be a bit
clearer, and go on a mad section-labelling spree.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-04-26 20:30:13 +01:00
Daniel Stone
400365a9bf typo fix
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-04-26 19:51:41 +01:00
Daniel Stone
416f077d87 Add FIXME sidebars, remove single-grab stipulation
Add very visible FIXME sections to more clearly mark what's broken; also
remove the stipulation that only one grab may be active at a time.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-04-22 16:14:54 +01:00
Daniel Stone
a500bc990b Add inline references, fix usecase bulleting
Replace 'see section x.y.z' with better inline links; fix nested
bulleting of XI 2.1 usecases.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-04-22 15:42:09 +01:00
Daniel Stone
3a89a5a300 Doc note: No seriously, this is WIP
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-04-22 15:31:52 +01:00
Daniel Stone
b46a3bafd9 Formatting fixups and minor rewording
No semantic changes.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-04-22 15:23:01 +01:00
Daniel Stone
e19eaef83d Require configure flag to build this proto version.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-22 14:10:26 +01:00
Peter Hutterer
ca39f67c2a Put a #warning and #error in to avoid unsuspecting XI 2.1 users.
The #warning directive is intentionally outside the define to disable the
error. Early adopters of the protocol can't see this warning often enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-22 14:10:25 +01:00
Alexandre Julliard
b1149ab782 XI2.h: Fix off-by-one error in the XIMaskLen definition.
The previous definition would give the wrong result for events that are
a multiple of 8.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-14 12:34:31 +10:00
Peter Hutterer
ab930a5104 specs: enable asciidoc parsing for XIproto.txt
The vast majority of this patch are indentation changes, removing preceding
spaces from text.
Header lines  and some linebreaks to enable list parsing were added.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-03-24 10:06:05 +10:00
Peter Hutterer
ef7518cc62 specs: move erroneous Errors: line to where it belongs
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-03-24 09:43:03 +10:00
Peter Hutterer
ed840d79d3 specs: rewrite pointer emulation section
plus a fixme

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:12 +10:00
Peter Hutterer
15e76dd365 specs: rewrite pointer emulation for indirect devices
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:12 +10:00
Peter Hutterer
9c2817fd76 specs: Rewrite Touch events delivery section
And add a fixme

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:12 +10:00
Peter Hutterer
c883261f2b specs: Add a fixme for using raw events instead of GrabModeObserve
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:12 +10:00
Peter Hutterer
3571092495 specs: clean/rewrite touch grab and ownership bits
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:12 +10:00
Peter Hutterer
f24c9ae749 spec: Move ClientPointer up again.
Prep work to have a separate first-class headline for touch processing

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:12 +10:00
Peter Hutterer
0e4a782339 specs: move warning about out-of-band processing up a bit.
The out-of-band processing is really only important for pointer emulation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:12 +10:00
Peter Hutterer
1d720b30c9 specs: move touch sequence handling (owner-only) up a bit.
This is to restructure to get the simple cases clarified up first before
explaining more complex changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 16:20:09 +10:00
Peter Hutterer
a4583dcd3e specs: move from "init move destroy" to "begin update end"
And rewrite that paragraph a bit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-18 12:03:26 +10:00