diff options
Diffstat (limited to 'eventcomm.c')
-rw-r--r-- | eventcomm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/eventcomm.c b/eventcomm.c index 598bd86..1beb32b 100644 --- a/eventcomm.c +++ b/eventcomm.c @@ -147,6 +147,7 @@ EventReadHwState(LocalDevicePtr local, struct SynapticsHwInfo *synhw, else hw->numFingers = 0; *hwRet = *hw; + hw->guest_dx = hw->guest_dy = 0; return TRUE; } case EV_KEY: @@ -200,6 +201,12 @@ EventReadHwState(LocalDevicePtr local, struct SynapticsHwInfo *synhw, case BTN_TOOL_TRIPLETAP: comm->threeFingers = v; break; + case BTN_A: + hw->guest_left = v; + break; + case BTN_B: + hw->guest_right = v; + break; } break; case EV_ABS: @@ -218,6 +225,16 @@ EventReadHwState(LocalDevicePtr local, struct SynapticsHwInfo *synhw, break; } break; + case EV_REL: + switch (ev.code) { + case REL_X: + hw->guest_dx = ev.value; + break; + case REL_Y: + hw->guest_dy = ev.value; + break; + } + break; } } return FALSE; |