diff options
author | Ville Syrjala <syrjala@sci.fi> | 2011-01-24 01:06:40 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-01-27 14:22:02 +1000 |
commit | 7b16e8633d5a95167aac0c19e43fcfe38bd4a6a4 (patch) | |
tree | 045460f16fd74065fd2c674b31723a064243739d | |
parent | a2c481821997ae14aa5816895ae36db2ca2e4dec (diff) |
xfree86/input: Restore DGAStealKeyEvent()
DGA key event support was lost in commit
8da0ff2d51086666d10ca7330d428e8610a4a0e3. Bring it back.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | 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 b9006ab07..6fdf1eb06 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, |