summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2010-07-16 09:21:19 -0400
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-22 13:37:57 +1000
commit65c0fc81eb920085e650b8c9e874c9dd26c7ec98 (patch)
treeac513fa8127b4dc8d4e8003d3cd4f1be21fe060e /include
parent9696c782c8cb86b06d12949899582533a2e04cfe (diff)
Add support for per-axis valuator modes (Relative/Absolute)
The XI2 protocol supports per-axis modes, but the server so far does not. This change adds support in the server. A complication is the fact that XI1 does not support per-axis modes. The solution provided here is to set a per-device mode that defines the mode of at least the first two valuators (X and Y). Note that initializing the first two axes to a different mode than the device mode will fail. For XI1 events, any axes following the first two that have the same mode will be sent to clients, up to the first axis that has a different mode. Thus, if a device has relative, then absolute, then relative mode axes, only the first block of relative axes will be sent over XI1. Since the XI2 protocol supports per-axis modes, all axes are sent to the client. Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'include')
-rw-r--r--include/exevents.h3
-rw-r--r--include/inputstr.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/exevents.h b/include/exevents.h
index b64252f36..bfee385d3 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -48,7 +48,8 @@ extern _X_EXPORT void InitValuatorAxisStruct(
int /* maxval */,
int /* resolution */,
int /* min_res */,
- int /* max_res */);
+ int /* max_res */,
+ int /* mode */);
/* Input device properties */
extern _X_EXPORT void XIDeleteAllDeviceProperties(
diff --git a/include/inputstr.h b/include/inputstr.h
index ec9749e36..dfab791e6 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -218,6 +218,7 @@ typedef struct _AxisInfo {
int min_value;
int max_value;
Atom label;
+ CARD8 mode;
} AxisInfo, *AxisInfoPtr;
typedef struct _ValuatorAccelerationRec {