[PATCH 05/27] Input: Add flags to DeviceEvent

Daniel Stone daniel at fooishbar.org
Fri Jun 3 07:59:41 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>
---
 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 9da819d..ced770e 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -791,6 +791,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 f93f1e7..365b19d 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -121,6 +121,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