[PATCH (v5) xserver 6/8] Input: Add flags to DeviceEvent

Daniel Stone daniel at fooishbar.org
Wed Jan 19 15:11:48 PST 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>
---

v5: No changes.

 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 7b894f0..76d9a3e 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -576,6 +576,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 377cceb..e1f5003 100644
--- a/include/eventstr.h
+++ b/include/eventstr.h
@@ -117,6 +117,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.2.3



More information about the xorg-devel mailing list