summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-10-24 14:38:13 -0400
committerAdam Jackson <ajax@redhat.com>2017-10-24 15:53:28 -0400
commitc2c6e9e68a8815420233c996acdd29ba572b1f0e (patch)
tree4dbdd7820306e89a6cc3ae46c002027e92fa0966 /xkb
parentbc5fb8c0928498c32dc33680d40d50e6db5879b6 (diff)
dix: Don't track the XKB client versions in the ClientRec
XKB stores some stuff in the ClientRec that, style-wise, should probably be in a client private. vMinor tracks the client's idea of the XKB minor version, but is never read, we can just nuke it. vMajor is only used for a bug-compat workaround for X11R6.0-vintage clients. We're only using though (1<<4) for xkbClientFlags in the protocol, so we can pack that field down to a u8 and store the bug-compat flag there. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 678f82368..392023f4c 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -172,8 +172,8 @@ ProcXkbUseExtension(ClientPtr client)
if ((supported) && (!(client->xkbClientFlags & _XkbClientInitialized))) {
client->xkbClientFlags = _XkbClientInitialized;
- client->vMajor = stuff->wantedMajor;
- client->vMinor = stuff->wantedMinor;
+ if (stuff->wantedMajor == 0)
+ client->xkbClientFlags |= _XkbClientIsAncient;
}
else if (xkbDebugFlags & 0x1) {
ErrorF
@@ -2388,7 +2388,8 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
if ((xkb->min_key_code != req->minKeyCode) ||
(xkb->max_key_code != req->maxKeyCode)) {
- if (client->vMajor != 1) { /* pre 1.0 versions of Xlib have a bug */
+ if (client->xkbClientFlags & _XkbClientIsAncient) {
+ /* pre 1.0 versions of Xlib have a bug */
req->minKeyCode = xkb->min_key_code;
req->maxKeyCode = xkb->max_key_code;
}