[PATCH 02/11] xfree86/input: Restore DGAStealKeyEvent()

Ville Syrjala syrjala at sci.fi
Sun Jan 23 15:06:40 PST 2011


DGA key event support was lost in commit
8da0ff2d51086666d10ca7330d428e8610a4a0e3. Bring it back.

Signed-off-by: Ville Syrjala <syrjala at sci.fi>
---
 hw/xfree86/common/xf86Xinput.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index b9006ab..6fdf1eb 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -1240,6 +1240,19 @@ xf86PostKeyEventM(DeviceIntPtr	device,
 {
     int i = 0, nevents = 0;
 
+#if XFreeXDGA
+    int index;
+    DeviceIntPtr pointer;
+
+    /* Some pointers send key events, paired device is wrong then. */
+    pointer = IsPointerDevice(device) ? device : GetPairedDevice(device);
+    if (miPointerGetScreen(pointer)) {
+        index = miPointerGetScreen(pointer)->myNum;
+        if (DGAStealKeyEvent(device, index, key_code, is_down))
+            return;
+    }
+#endif
+
     if (is_absolute) {
         nevents = GetKeyboardValuatorEvents(xf86Events, device,
                                             is_down ? KeyPress : KeyRelease,
-- 
1.7.3.4



More information about the xorg-devel mailing list