aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xipassivegrab.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/Xi/xipassivegrab.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/Xi/xipassivegrab.c')
-rw-r--r--xorg-server/Xi/xipassivegrab.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/xorg-server/Xi/xipassivegrab.c b/xorg-server/Xi/xipassivegrab.c
index 713a1654e..c80da8044 100644
--- a/xorg-server/Xi/xipassivegrab.c
+++ b/xorg-server/Xi/xipassivegrab.c
@@ -108,19 +108,29 @@ ProcXIPassiveGrabDevice(ClientPtr client)
if (stuff->grab_type != XIGrabtypeButton &&
stuff->grab_type != XIGrabtypeKeycode &&
stuff->grab_type != XIGrabtypeEnter &&
- stuff->grab_type != XIGrabtypeFocusIn)
+ stuff->grab_type != XIGrabtypeFocusIn &&
+ stuff->grab_type != XIGrabtypeTouchBegin)
{
client->errorValue = stuff->grab_type;
return BadValue;
}
if ((stuff->grab_type == XIGrabtypeEnter ||
- stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0)
+ stuff->grab_type == XIGrabtypeFocusIn ||
+ stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0)
{
client->errorValue = stuff->detail;
return BadValue;
}
+ if (stuff->grab_type == XIGrabtypeTouchBegin &&
+ (stuff->grab_mode != XIGrabModeTouch ||
+ stuff->paired_device_mode != GrabModeAsync))
+ {
+ client->errorValue = stuff->grab_mode;
+ return BadValue;
+ }
+
if (XICheckInvalidMaskBits(client, (unsigned char*)&stuff[1],
stuff->mask_len * 4) != Success)
return BadValue;
@@ -141,11 +151,17 @@ ProcXIPassiveGrabDevice(ClientPtr client)
memset(&param, 0, sizeof(param));
param.grabtype = XI2;
param.ownerEvents = stuff->owner_events;
- param.this_device_mode = stuff->grab_mode;
- param.other_devices_mode = stuff->paired_device_mode;
param.grabWindow = stuff->grab_window;
param.cursor = stuff->cursor;
+ if (IsKeyboardDevice(dev)) {
+ param.this_device_mode = stuff->grab_mode;
+ param.other_devices_mode = stuff->paired_device_mode;
+ } else {
+ param.this_device_mode = stuff->paired_device_mode;
+ param.other_devices_mode = stuff->grab_mode;
+ }
+
if (stuff->cursor != None)
{
ret = dixLookupResourceByType(&tmp, stuff->cursor,
@@ -194,6 +210,9 @@ ProcXIPassiveGrabDevice(ClientPtr client)
status = GrabWindow(client, dev, stuff->grab_type,
&param, &mask);
break;
+ case XIGrabtypeTouchBegin:
+ status = GrabTouch(client, dev, mod_dev, &param, &mask);
+ break;
}
if (status != GrabSuccess)