Merge remote-tracking branch 'whot/for-keith'
This commit is contained in:
commit
ff38bbe81a
|
@ -71,13 +71,37 @@ ProcXIQueryVersion(ClientPtr client)
|
||||||
pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
|
pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
|
||||||
|
|
||||||
if (pXIClient->major_version) {
|
if (pXIClient->major_version) {
|
||||||
if (version_compare(stuff->major_version, stuff->minor_version,
|
|
||||||
pXIClient->major_version, pXIClient->minor_version) < 0) {
|
/* Check to see if the client has only ever asked
|
||||||
client->errorValue = stuff->major_version;
|
* for version 2.2 or higher
|
||||||
return BadValue;
|
*/
|
||||||
|
if (version_compare(stuff->major_version, stuff->minor_version, 2, 2) >= 0 &&
|
||||||
|
version_compare(pXIClient->major_version, pXIClient->minor_version, 2, 2) >= 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* As of version 2.2, Peter promises to never again break
|
||||||
|
* backward compatibility, so we'll return the requested
|
||||||
|
* version to the client but leave the server internal
|
||||||
|
* version set to the highest requested value
|
||||||
|
*/
|
||||||
|
major = stuff->major_version;
|
||||||
|
minor = stuff->minor_version;
|
||||||
|
if (version_compare(stuff->major_version, stuff->minor_version,
|
||||||
|
pXIClient->major_version, pXIClient->minor_version) > 0)
|
||||||
|
{
|
||||||
|
pXIClient->major_version = stuff->major_version;
|
||||||
|
pXIClient->minor_version = stuff->minor_version;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (version_compare(stuff->major_version, stuff->minor_version,
|
||||||
|
pXIClient->major_version, pXIClient->minor_version) < 0) {
|
||||||
|
|
||||||
|
client->errorValue = stuff->major_version;
|
||||||
|
return BadValue;
|
||||||
|
}
|
||||||
|
major = pXIClient->major_version;
|
||||||
|
minor = pXIClient->minor_version;
|
||||||
}
|
}
|
||||||
major = pXIClient->major_version;
|
|
||||||
minor = pXIClient->minor_version;
|
|
||||||
} else {
|
} else {
|
||||||
if (version_compare(XIVersion.major_version, XIVersion.minor_version,
|
if (version_compare(XIVersion.major_version, XIVersion.minor_version,
|
||||||
stuff->major_version, stuff->minor_version) > 0) {
|
stuff->major_version, stuff->minor_version) > 0) {
|
||||||
|
|
|
@ -239,7 +239,7 @@ set_valuators(DeviceIntPtr dev, DeviceEvent *event, ValuatorMask *mask)
|
||||||
SetBit(event->valuators.mode, i);
|
SetBit(event->valuators.mode, i);
|
||||||
event->valuators.data[i] = valuator_mask_get_double(mask, i);
|
event->valuators.data[i] = valuator_mask_get_double(mask, i);
|
||||||
}
|
}
|
||||||
else if (valuator_get_mode(dev, i) == Absolute)
|
else
|
||||||
event->valuators.data[i] = dev->valuator->axisVal[i];
|
event->valuators.data[i] = dev->valuator->axisVal[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -895,8 +895,7 @@ TouchAddActiveGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||||
|
|
||||||
if (!ti->emulate_pointer &&
|
if (!ti->emulate_pointer &&
|
||||||
grab->grabtype == XI2 &&
|
grab->grabtype == XI2 &&
|
||||||
(grab->type != XI_TouchBegin && grab->type != XI_TouchEnd &&
|
!xi2mask_isset(grab->xi2mask, dev, XI_TouchBegin))
|
||||||
grab->type != XI_TouchUpdate))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TouchAddGrabListener(dev, ti, ev, grab);
|
TouchAddGrabListener(dev, ti, ev, grab);
|
||||||
|
|
|
@ -195,7 +195,7 @@ typedef struct _GrabRec {
|
||||||
unsigned keyboardMode:1;
|
unsigned keyboardMode:1;
|
||||||
unsigned pointerMode:1;
|
unsigned pointerMode:1;
|
||||||
enum InputLevel grabtype;
|
enum InputLevel grabtype;
|
||||||
CARD8 type; /* event type */
|
CARD8 type; /* event type for passive grabs, 0 for active grabs */
|
||||||
DetailRec modifiersDetail;
|
DetailRec modifiersDetail;
|
||||||
DeviceIntPtr modifierDevice;
|
DeviceIntPtr modifierDevice;
|
||||||
DetailRec detail; /* key or button */
|
DetailRec detail; /* key or button */
|
||||||
|
|
Loading…
Reference in New Issue