summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2011-06-09 16:02:47 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2011-09-29 12:23:51 +1000
commit60a766a96f9ec97adf6d0273f70ec23f313a11c6 (patch)
tree99a9aaaa760ca40acd575a9454080d5b35b69fb1
parent5d62c32981dbe9630bed32567b55008b536c81c5 (diff)
Input: Add flags to RawDeviceEvent
Add a flags member which will be copied wholesale into the resultant xXIRawEvent. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--dix/eventconvert.c1
-rw-r--r--include/eventstr.h1
-rw-r--r--test/xi2/protocol-eventconvert.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 6ddcf9e8b..fa8ba9ec0 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -667,6 +667,7 @@ eventToRawEvent(RawDeviceEvent *ev, xEvent **xi)
raw->detail = ev->detail.button;
raw->deviceid = ev->deviceid;
raw->valuators_len = vallen;
+ raw->flags = ev->flags;
ptr = (char*)&raw[1];
axisval = (FP3232*)(ptr + raw->valuators_len * 4);
diff --git a/include/eventstr.h b/include/eventstr.h
index 0885883a5..ecaeddcb6 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -204,6 +204,7 @@ struct _RawDeviceEvent
int32_t data_raw[MAX_VALUATORS]; /**< Valuator data as posted */
int32_t data_raw_frac[MAX_VALUATORS];/**< Fractional part for data_raw */
} valuators;
+ uint32_t flags; /**< Flags to be copied into the generated event */
};
#ifdef XQUARTZ
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c
index 6ec94be6c..80c47b06f 100644
--- a/test/xi2/protocol-eventconvert.c
+++ b/test/xi2/protocol-eventconvert.c
@@ -51,6 +51,7 @@ static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent *out,
swapl(&out->time);
swapl(&out->detail);
swaps(&out->valuators_len);
+ swapl(&out->flags);
}