[PATCH 02/28] Input: Add flags to DeviceEvent

Daniel Stone daniel at fooishbar.org
Thu Jun 9 10:17:10 PDT 2011


Add a flags member which will be copied wholesale into the resultant
xXIDeviceEvent.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/eventconvert.c |    1 +
 include/eventstr.h |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 024f2e8..6ddcf9e 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -605,6 +605,7 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
     xde->root_x         = FP1616(ev->root_x, ev->root_x_frac);
     xde->root_y         = FP1616(ev->root_y, ev->root_y_frac);
 
+    xde->flags          = ev->flags;
     if (ev->key_repeat)
         xde->flags      |= XIKeyRepeat;
 
diff --git a/include/eventstr.h b/include/eventstr.h
index 049688c..0885883 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -113,6 +113,7 @@ struct _DeviceEvent
     Window      root; /**< Root window of the event */
     int corestate;    /**< Core key/button state BEFORE the event */
     int key_repeat;   /**< Internally-generated key repeat event */
+    uint32_t flags;   /**< Flags to be copied into the generated event */
 };
 
 
-- 
1.7.5.3



More information about the xorg-devel mailing list