aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/inpututils.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-23 10:01:52 +0100
committermarha <marha@users.sourceforge.net>2011-12-23 10:01:52 +0100
commite22891346b85a7db40dec7260a100f90b451cbc8 (patch)
treea7dd2d6757253947bcc821abbf68fd24d3301e89 /xorg-server/dix/inpututils.c
parentabacebe06d9f3d2fe1b7d256bd86cddbfa592a85 (diff)
downloadvcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.tar.gz
vcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.tar.bz2
vcxsrv-e22891346b85a7db40dec7260a100f90b451cbc8.zip
git mesa pixman xserver xkeyboard-config update 24 dec 2011
Diffstat (limited to 'xorg-server/dix/inpututils.c')
-rw-r--r--xorg-server/dix/inpututils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xorg-server/dix/inpututils.c b/xorg-server/dix/inpututils.c
index 8cd4d5921..d279c1d75 100644
--- a/xorg-server/dix/inpututils.c
+++ b/xorg-server/dix/inpututils.c
@@ -663,6 +663,8 @@ int event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd)
/* core state needs to be assembled BEFORE the device is updated. */
corestate = (kbd && kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo->state) : 0;
corestate |= (mouse && mouse->button) ? (mouse->button->state) : 0;
+ corestate |= (mouse && mouse->touch) ? (mouse->touch->state) : 0;
+
return corestate;
}
@@ -672,7 +674,10 @@ void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event)
for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
if (BitIsOn(mouse->button->down, i))
- SetBit(event->buttons, i);
+ SetBit(event->buttons, mouse->button->map[i]);
+
+ if (mouse && mouse->touch && mouse->touch->buttonsDown > 0)
+ SetBit(event->buttons, mouse->button->map[1]);
if (kbd && kbd->key)
{