xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Tue Oct 24 19:59:58 UTC 2017


 include/dixstruct.h |    5 +----
 include/xkbsrv.h    |    3 ++-
 xkb/xkb.c           |    7 ++++---
 3 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit c2c6e9e68a8815420233c996acdd29ba572b1f0e
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Oct 24 14:38:13 2017 -0400

    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 at redhat.com>
    Reviewed-by: Julien Cristau <jcristau at debian.org>

diff --git a/include/dixstruct.h b/include/dixstruct.h
index 28bff66f8..ad3352ae5 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -100,10 +100,9 @@ typedef struct _Client {
     CARD32 req_len;             /* length of current request */
     unsigned int replyBytesRemaining;
     PrivateRec *devPrivates;
-    unsigned short xkbClientFlags;
     unsigned short mapNotifyMask;
     unsigned short newKeyboardNotifyMask;
-    unsigned short vMajor, vMinor;
+    unsigned char xkbClientFlags;
     KeyCode minKC, maxKC;
 
     int smart_start_tick;
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 2870f3987..fbb5427e1 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -235,7 +235,8 @@ typedef struct _XkbSrvLedInfo {
  * Settings for xkbClientFlags field (used by DIX)
  * These flags _must_ not overlap with XkbPCF_*
  */
-#define	_XkbClientInitialized		(1<<15)
+#define _XkbClientInitialized           (1<<7)
+#define _XkbClientIsAncient             (1<<6)
 
 #define	_XkbWantsDetectableAutoRepeat(c)\
 	((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask)
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;
         }
commit bc5fb8c0928498c32dc33680d40d50e6db5879b6
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Oct 24 14:38:12 2017 -0400

    dix: Don't vary the ClientRec ABI at build time
    
    Just no.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Julien Cristau <jcristau at debian.org>

diff --git a/include/dixstruct.h b/include/dixstruct.h
index 70f87959e..28bff66f8 100644
--- a/include/dixstruct.h
+++ b/include/dixstruct.h
@@ -111,9 +111,7 @@ typedef struct _Client {
 
     DeviceIntPtr clientPtr;
     ClientIdPtr clientIds;
-#if XTRANS_SEND_FDS
     int req_fds;
-#endif
 } ClientRec;
 
 #if XTRANS_SEND_FDS


More information about the xorg-commit mailing list