xserver: Branch 'master' - 55 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 6 22:34:10 UTC 2025


 Xext/bigreq.c                           |    3 -
 Xext/dpms.c                             |   72 +---------------------------
 Xext/panoramiXSwap.c                    |   42 +---------------
 Xext/saver.c                            |   21 +-------
 Xext/security.c                         |   10 ---
 Xext/shape.c                            |   28 -----------
 Xext/shm.c                              |   18 -------
 Xext/sync.c                             |   42 ----------------
 Xext/vidmode.c                          |   46 ++----------------
 Xext/xcmisc.c                           |   14 -----
 Xext/xf86bigfont.c                      |    4 -
 Xext/xres.c                             |    1 
 Xext/xselinux_ext.c                     |    2 
 Xext/xtest.c                            |   22 +-------
 Xext/xvdisp.c                           |   30 -----------
 Xi/allowev.c                            |    1 
 Xi/chgdctl.c                            |    3 -
 Xi/chgfctl.c                            |    3 -
 Xi/chgkbd.c                             |   17 ------
 Xi/chgkbd.h                             |    3 -
 Xi/chgkmap.c                            |    3 -
 Xi/chgprop.c                            |    3 -
 Xi/chgptr.c                             |   16 ------
 Xi/chgptr.h                             |    3 -
 Xi/closedev.c                           |   15 -----
 Xi/closedev.h                           |    3 -
 Xi/devbell.c                            |   15 -----
 Xi/devbell.h                            |    3 -
 Xi/extinit.c                            |   38 +++++++--------
 Xi/getbmap.c                            |   14 -----
 Xi/getbmap.h                            |    3 -
 Xi/getdctl.c                            |    1 
 Xi/getfctl.c                            |   15 -----
 Xi/getfctl.h                            |    3 -
 Xi/getfocus.c                           |   14 -----
 Xi/getfocus.h                           |    3 -
 Xi/getkmap.c                            |   15 -----
 Xi/getkmap.h                            |    3 -
 Xi/getmmap.c                            |   15 -----
 Xi/getmmap.h                            |    3 -
 Xi/getprop.c                            |    1 
 Xi/getselev.c                           |    1 
 Xi/getvers.c                            |    3 -
 Xi/grabdev.c                            |    6 +-
 Xi/grabdevb.c                           |    3 -
 Xi/grabdevk.c                           |    3 -
 Xi/gtmotion.c                           |    1 
 Xi/listdev.c                            |   14 -----
 Xi/listdev.h                            |    3 -
 Xi/opendev.c                            |   15 -----
 Xi/opendev.h                            |    3 -
 Xi/queryst.c                            |   14 -----
 Xi/queryst.h                            |    3 -
 Xi/selectev.c                           |    3 -
 Xi/sendexev.c                           |    5 -
 Xi/setbmap.c                            |   16 ------
 Xi/setbmap.h                            |    3 -
 Xi/setdval.c                            |   16 ------
 Xi/setdval.h                            |    3 -
 Xi/setfocus.c                           |    1 
 Xi/setmmap.c                            |   17 ------
 Xi/setmmap.h                            |    3 -
 Xi/setmode.c                            |   14 -----
 Xi/setmode.h                            |    3 -
 Xi/ungrdev.c                            |    1 
 Xi/ungrdevb.c                           |    1 
 Xi/ungrdevk.c                           |    1 
 Xi/xiallowev.c                          |    3 -
 Xi/xibarriers.c                         |    1 
 Xi/xichangecursor.c                     |    1 
 Xi/xichangehierarchy.c                  |    8 ---
 Xi/xichangehierarchy.h                  |    1 
 Xi/xigetclientpointer.c                 |    1 
 Xi/xigrabdev.c                          |    2 
 Xi/xipassivegrab.c                      |    2 
 Xi/xiproperty.c                         |   17 ------
 Xi/xiproperty.h                         |    1 
 Xi/xiquerydevice.c                      |    1 
 Xi/xiquerypointer.c                     |    1 
 Xi/xiqueryversion.c                     |    1 
 Xi/xiselectev.c                         |    8 +--
 Xi/xisetclientpointer.c                 |    1 
 Xi/xisetdevfocus.c                      |    2 
 Xi/xiwarppointer.c                      |    1 
 composite/compext.c                     |   18 -------
 damageext/damageext.c                   |   10 ---
 dbe/dbe.c                               |   37 --------------
 dix/swapreq.c                           |   81 --------------------------------
 dix/tables.c                            |    2 
 dri3/dri3_request.c                     |   22 --------
 hw/xfree86/dri/xf86dri.c                |   11 ----
 hw/xfree86/dri2/dri2ext.c               |    5 -
 hw/xquartz/applewm.c                    |    5 -
 hw/xquartz/xpr/appledri.c               |    7 --
 hw/xwayland/xwayland.c                  |    2 
 hw/xwin/dri/windowsdri.c                |    4 -
 include/swapreq.h                       |    1 
 present/present_request.c               |    7 --
 pseudoramiX/pseudoramiX.c               |    6 --
 randr/rrcrtc.c                          |    2 
 randr/rrmode.c                          |    2 
 randr/rrmonitor.c                       |    2 
 randr/rrproperty.c                      |    2 
 randr/rrproviderproperty.c              |    2 
 randr/rrsdispatch.c                     |   44 -----------------
 randr/rrxinerama.c                      |   36 +-------------
 record/record.c                         |   14 -----
 render/render.c                         |   29 -----------
 test/xi2/protocol-xigetselectedevents.c |   12 ++++
 test/xi2/protocol-xipassivegrabdevice.c |   12 ++++
 test/xi2/protocol-xiselectevents.c      |   11 +++-
 test/xi2/protocol-xisetclientpointer.c  |   12 ++++
 xfixes/cursor.c                         |   19 -------
 xfixes/disconnect.c                     |    6 --
 xfixes/region.c                         |   34 -------------
 xfixes/saveset.c                        |    1 
 xfixes/select.c                         |    2 
 xfixes/xfixes.c                         |    1 
 xkb/xkb.c                               |   18 +++----
 xkb/xkbSwap.c                           |   52 --------------------
 120 files changed, 134 insertions(+), 1176 deletions(-)

New commits:
commit 16ca87703ceea242122a384bc360c94e68f726fb
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:22:20 2024 +0200

    xfree86: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 139ad484d..ba7bbd6e9 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -559,12 +559,6 @@ ProcXF86DRIDispatch(register ClientPtr client)
     }
 }
 
-static int _X_COLD
-SProcXF86DRIQueryVersion(register ClientPtr client)
-{
-    return ProcXF86DRIQueryVersion(client);
-}
-
 static int _X_COLD
 SProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client)
 {
@@ -585,7 +579,7 @@ SProcXF86DRIDispatch(register ClientPtr client)
      */
     switch (stuff->data) {
     case X_XF86DRIQueryVersion:
-        return SProcXF86DRIQueryVersion(client);
+        return ProcXF86DRIQueryVersion(client);
     case X_XF86DRIQueryDirectRenderingCapable:
         return SProcXF86DRIQueryDirectRenderingCapable(client);
     default:
commit 190346663b4e61d64082be5cb36ddee46973c95c
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:21:48 2024 +0200

    Xi: drop now obsolete swap procs
    
    Lots of SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xi/chgkbd.c b/Xi/chgkbd.c
index a196b5046..8e16c9dea 100644
--- a/Xi/chgkbd.c
+++ b/Xi/chgkbd.c
@@ -69,20 +69,6 @@ SOFTWARE.
  * This procedure changes the keyboard device.
  *
  */
-
-int _X_COLD
-SProcXChangeKeyboardDevice(ClientPtr client)
-{
-    return (ProcXChangeKeyboardDevice(client));
-}
-
-/***********************************************************************
- *
- * This procedure is invoked to swap the request bytes if the server and
- * client have a different byte order.
- *
- */
-
 int
 ProcXChangeKeyboardDevice(ClientPtr client)
 {
diff --git a/Xi/chgkbd.h b/Xi/chgkbd.h
index ec567fe42..55ea3947a 100644
--- a/Xi/chgkbd.h
+++ b/Xi/chgkbd.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef CHGKBD_H
 #define CHGKBD_H 1
 
-int SProcXChangeKeyboardDevice(ClientPtr        /* client */
-    );
-
 int ProcXChangeKeyboardDevice(ClientPtr /* client */
     );
 
diff --git a/Xi/chgptr.c b/Xi/chgptr.c
index b6e4777b9..42d160bf3 100644
--- a/Xi/chgptr.c
+++ b/Xi/chgptr.c
@@ -65,19 +65,6 @@ SOFTWARE.
 
 #include "chgptr.h"
 
-/***********************************************************************
- *
- * This procedure is invoked to swap the request bytes if the server and
- * client have a different byte order.
- *
- */
-
-int _X_COLD
-SProcXChangePointerDevice(ClientPtr client)
-{
-    return (ProcXChangePointerDevice(client));
-}
-
 /***********************************************************************
  *
  * This procedure changes the device used as the X pointer.
diff --git a/Xi/chgptr.h b/Xi/chgptr.h
index 275511ffc..3a85f0f03 100644
--- a/Xi/chgptr.h
+++ b/Xi/chgptr.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef CHGPTR_H
 #define CHGPTR_H 1
 
-int SProcXChangePointerDevice(ClientPtr /* client */
-    );
-
 int ProcXChangePointerDevice(ClientPtr  /* client */
     );
 
diff --git a/Xi/closedev.c b/Xi/closedev.c
index d7743f105..15099d054 100644
--- a/Xi/closedev.c
+++ b/Xi/closedev.c
@@ -62,18 +62,6 @@ SOFTWARE.
 
 #include "closedev.h"
 
-/***********************************************************************
- *
- * This procedure closes an input device.
- *
- */
-
-int _X_COLD
-SProcXCloseDevice(ClientPtr client)
-{
-    return (ProcXCloseDevice(client));
-}
-
 /***********************************************************************
  *
  * Clear out event selections and passive grabs from a window for the
diff --git a/Xi/closedev.h b/Xi/closedev.h
index 798c02379..201d14f0a 100644
--- a/Xi/closedev.h
+++ b/Xi/closedev.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef CLOSEDEV_H
 #define CLOSEDEV_H 1
 
-int SProcXCloseDevice(ClientPtr /* client */
-    );
-
 int ProcXCloseDevice(ClientPtr  /* client */
     );
 
diff --git a/Xi/devbell.c b/Xi/devbell.c
index 598780e65..76085c738 100644
--- a/Xi/devbell.c
+++ b/Xi/devbell.c
@@ -59,19 +59,6 @@ SOFTWARE.
 
 #include "devbell.h"
 
-/***********************************************************************
- *
- * This procedure is invoked to swap the request bytes if the server and
- * client have a different byte order.
- *
- */
-
-int _X_COLD
-SProcXDeviceBell(ClientPtr client)
-{
-    return (ProcXDeviceBell(client));
-}
-
 /***********************************************************************
  *
  * This procedure rings a bell on an extension device.
diff --git a/Xi/devbell.h b/Xi/devbell.h
index 2d0b05aa3..c83a9d4b0 100644
--- a/Xi/devbell.h
+++ b/Xi/devbell.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef DEVBELL_H
 #define DEVBELL_H 1
 
-int SProcXDeviceBell(ClientPtr  /* client */
-    );
-
 int ProcXDeviceBell(ClientPtr   /* client */
     );
 
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 223722ad2..f6f21f30d 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -252,19 +252,19 @@ static int (*ProcIVector[]) (ClientPtr) = {
 
 /* For swapped clients */
 static int (*SProcIVector[]) (ClientPtr) = {
-    NULL,                       /*  0 */
+        NULL,                       /*  0 */
         SProcXGetExtensionVersion,      /*  1 */
-        SProcXListInputDevices, /*  2 */
-        SProcXOpenDevice,       /*  3 */
-        SProcXCloseDevice,      /*  4 */
-        SProcXSetDeviceMode,    /*  5 */
+        ProcXListInputDevices, /*  2 */
+        ProcXOpenDevice,       /*  3 */
+        ProcXCloseDevice,      /*  4 */
+        ProcXSetDeviceMode,    /*  5 */
         SProcXSelectExtensionEvent,     /*  6 */
         SProcXGetSelectedExtensionEvents,       /*  7 */
         SProcXChangeDeviceDontPropagateList,    /*  8 */
         SProcXGetDeviceDontPropagateList,       /*  9 */
         SProcXGetDeviceMotionEvents,    /* 10 */
-        SProcXChangeKeyboardDevice,     /* 11 */
-        SProcXChangePointerDevice,      /* 12 */
+        ProcXChangeKeyboardDevice,     /* 11 */
+        ProcXChangePointerDevice,      /* 12 */
         SProcXGrabDevice,       /* 13 */
         SProcXUngrabDevice,     /* 14 */
         SProcXGrabDeviceKey,    /* 15 */
@@ -272,30 +272,30 @@ static int (*SProcIVector[]) (ClientPtr) = {
         SProcXGrabDeviceButton, /* 17 */
         SProcXUngrabDeviceButton,       /* 18 */
         SProcXAllowDeviceEvents,        /* 19 */
-        SProcXGetDeviceFocus,   /* 20 */
+        ProcXGetDeviceFocus,   /* 20 */
         SProcXSetDeviceFocus,   /* 21 */
-        SProcXGetFeedbackControl,       /* 22 */
+        ProcXGetFeedbackControl,       /* 22 */
         SProcXChangeFeedbackControl,    /* 23 */
-        SProcXGetDeviceKeyMapping,      /* 24 */
+        ProcXGetDeviceKeyMapping,      /* 24 */
         SProcXChangeDeviceKeyMapping,   /* 25 */
-        SProcXGetDeviceModifierMapping, /* 26 */
-        SProcXSetDeviceModifierMapping, /* 27 */
-        SProcXGetDeviceButtonMapping,   /* 28 */
-        SProcXSetDeviceButtonMapping,   /* 29 */
-        SProcXQueryDeviceState, /* 30 */
+        ProcXGetDeviceModifierMapping, /* 26 */
+        ProcXSetDeviceModifierMapping, /* 27 */
+        ProcXGetDeviceButtonMapping,   /* 28 */
+        ProcXSetDeviceButtonMapping,   /* 29 */
+        ProcXQueryDeviceState, /* 30 */
         SProcXSendExtensionEvent,       /* 31 */
-        SProcXDeviceBell,       /* 32 */
-        SProcXSetDeviceValuators,       /* 33 */
+        ProcXDeviceBell,       /* 32 */
+        ProcXSetDeviceValuators,       /* 33 */
         SProcXGetDeviceControl, /* 34 */
         SProcXChangeDeviceControl,      /* 35 */
-        SProcXListDeviceProperties,     /* 36 */
+        ProcXListDeviceProperties,     /* 36 */
         SProcXChangeDeviceProperty,     /* 37 */
         SProcXDeleteDeviceProperty,     /* 38 */
         SProcXGetDeviceProperty,        /* 39 */
         SProcXIQueryPointer,    /* 40 */
         SProcXIWarpPointer,     /* 41 */
         SProcXIChangeCursor,    /* 42 */
-        SProcXIChangeHierarchy, /* 43 */
+        ProcXIChangeHierarchy, /* 43 */
         SProcXISetClientPointer,        /* 44 */
         SProcXIGetClientPointer,        /* 45 */
         SProcXISelectEvents,    /* 46 */
diff --git a/Xi/getbmap.c b/Xi/getbmap.c
index 8344ddbc1..623978fd5 100644
--- a/Xi/getbmap.c
+++ b/Xi/getbmap.c
@@ -59,18 +59,6 @@ SOFTWARE.
 
 #include "getbmap.h"
 
-/***********************************************************************
- *
- * This procedure gets the button mapping for the specified device.
- *
- */
-
-int _X_COLD
-SProcXGetDeviceButtonMapping(ClientPtr client)
-{
-    return (ProcXGetDeviceButtonMapping(client));
-}
-
 /***********************************************************************
  *
  * This procedure gets the button mapping for the specified device.
diff --git a/Xi/getbmap.h b/Xi/getbmap.h
index 8b107d026..a320c7421 100644
--- a/Xi/getbmap.h
+++ b/Xi/getbmap.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef GETBMAP_H
 #define GETBMAP_H 1
 
-int SProcXGetDeviceButtonMapping(ClientPtr      /* client */
-    );
-
 int ProcXGetDeviceButtonMapping(ClientPtr       /* client */
     );
 
diff --git a/Xi/getfctl.c b/Xi/getfctl.c
index b920de468..562cd5260 100644
--- a/Xi/getfctl.c
+++ b/Xi/getfctl.c
@@ -59,19 +59,6 @@ SOFTWARE.
 
 #include "getfctl.h"
 
-/***********************************************************************
- *
- * This procedure gets the control attributes for an extension device,
- * for clients on machines with a different byte ordering than the server.
- *
- */
-
-int _X_COLD
-SProcXGetFeedbackControl(ClientPtr client)
-{
-    return (ProcXGetFeedbackControl(client));
-}
-
 /***********************************************************************
  *
  * This procedure copies KbdFeedbackClass data, swapping if necessary.
diff --git a/Xi/getfctl.h b/Xi/getfctl.h
index f0b240d4c..14944d28b 100644
--- a/Xi/getfctl.h
+++ b/Xi/getfctl.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef GETFCTL_H
 #define GETFCTL_H 1
 
-int SProcXGetFeedbackControl(ClientPtr  /* client */
-    );
-
 int ProcXGetFeedbackControl(ClientPtr   /* client */
     );
 
diff --git a/Xi/getfocus.c b/Xi/getfocus.c
index 41dda55b6..731896b7d 100644
--- a/Xi/getfocus.c
+++ b/Xi/getfocus.c
@@ -60,18 +60,6 @@ SOFTWARE.
 
 #include "getfocus.h"
 
-/***********************************************************************
- *
- * This procedure gets the focus for a device.
- *
- */
-
-int _X_COLD
-SProcXGetDeviceFocus(ClientPtr client)
-{
-    return (ProcXGetDeviceFocus(client));
-}
-
 /***********************************************************************
  *
  * This procedure gets the focus for a device.
diff --git a/Xi/getfocus.h b/Xi/getfocus.h
index 6e90ae77b..daaedfcbd 100644
--- a/Xi/getfocus.h
+++ b/Xi/getfocus.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef GETFOCUS_H
 #define GETFOCUS_H 1
 
-int SProcXGetDeviceFocus(ClientPtr      /* client */
-    );
-
 int ProcXGetDeviceFocus(ClientPtr       /* client */
     );
 
diff --git a/Xi/getkmap.c b/Xi/getkmap.c
index 6288e764a..5d9cba1d5 100644
--- a/Xi/getkmap.c
+++ b/Xi/getkmap.c
@@ -62,19 +62,6 @@ SOFTWARE.
 
 #include "getkmap.h"
 
-/***********************************************************************
- *
- * This procedure gets the key mapping for an extension device,
- * for clients on machines with a different byte ordering than the server.
- *
- */
-
-int _X_COLD
-SProcXGetDeviceKeyMapping(ClientPtr client)
-{
-    return (ProcXGetDeviceKeyMapping(client));
-}
-
 /***********************************************************************
  *
  * Get the device key mapping.
diff --git a/Xi/getkmap.h b/Xi/getkmap.h
index 8f0ff8eec..f51e0e96d 100644
--- a/Xi/getkmap.h
+++ b/Xi/getkmap.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef GETKMAP_H
 #define GETKMAP_H 1
 
-int SProcXGetDeviceKeyMapping(ClientPtr /* client */
-    );
-
 int ProcXGetDeviceKeyMapping(ClientPtr  /* client */
     );
 
diff --git a/Xi/getmmap.c b/Xi/getmmap.c
index c7242d361..4ff03a3bd 100644
--- a/Xi/getmmap.c
+++ b/Xi/getmmap.c
@@ -59,19 +59,6 @@ SOFTWARE.
 
 #include "getmmap.h"
 
-/***********************************************************************
- *
- * This procedure gets the modifier mapping for an extension device,
- * for clients on machines with a different byte ordering than the server.
- *
- */
-
-int _X_COLD
-SProcXGetDeviceModifierMapping(ClientPtr client)
-{
-    return (ProcXGetDeviceModifierMapping(client));
-}
-
 /***********************************************************************
  *
  * Get the device Modifier mapping.
diff --git a/Xi/getmmap.h b/Xi/getmmap.h
index d0a76df43..7512188ec 100644
--- a/Xi/getmmap.h
+++ b/Xi/getmmap.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef GETMMAP_H
 #define GETMMAP_H 1
 
-int SProcXGetDeviceModifierMapping(ClientPtr    /* client */
-    );
-
 int ProcXGetDeviceModifierMapping(ClientPtr     /* client */
     );
 
diff --git a/Xi/grabdev.c b/Xi/grabdev.c
index ba18a716a..9bae237d1 100644
--- a/Xi/grabdev.c
+++ b/Xi/grabdev.c
@@ -77,6 +77,7 @@ SProcXGrabDevice(ClientPtr client)
 {
     REQUEST(xGrabDeviceReq);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
+
     swapl(&stuff->grabWindow);
     swapl(&stuff->time);
     swaps(&stuff->event_count);
diff --git a/Xi/listdev.c b/Xi/listdev.c
index a1d4a90e5..bf2f439a4 100644
--- a/Xi/listdev.c
+++ b/Xi/listdev.c
@@ -68,18 +68,6 @@ SOFTWARE.
 #include "xkbstr.h"
 #include "listdev.h"
 
-/***********************************************************************
- *
- * This procedure lists the input devices available to the server.
- *
- */
-
-int _X_COLD
-SProcXListInputDevices(ClientPtr client)
-{
-    return (ProcXListInputDevices(client));
-}
-
 /***********************************************************************
  *
  * This procedure calculates the size of the information to be returned
diff --git a/Xi/listdev.h b/Xi/listdev.h
index 39ea2389f..c8f91796d 100644
--- a/Xi/listdev.h
+++ b/Xi/listdev.h
@@ -32,9 +32,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #define VPC	20              /* Max # valuators per chunk */
 
-int SProcXListInputDevices(ClientPtr    /* client */
-    );
-
 int ProcXListInputDevices(ClientPtr     /* client */
     );
 
diff --git a/Xi/opendev.c b/Xi/opendev.c
index 9d4e579fc..977a44115 100644
--- a/Xi/opendev.c
+++ b/Xi/opendev.c
@@ -64,19 +64,6 @@ SOFTWARE.
 
 extern CARD8 event_base[];
 
-/***********************************************************************
- *
- * This procedure swaps the request if the server and client have different
- * byte orderings.
- *
- */
-
-int _X_COLD
-SProcXOpenDevice(ClientPtr client)
-{
-    return (ProcXOpenDevice(client));
-}
-
 /***********************************************************************
  *
  * This procedure causes the server to open an input device.
diff --git a/Xi/opendev.h b/Xi/opendev.h
index e2d806197..641dd7862 100644
--- a/Xi/opendev.h
+++ b/Xi/opendev.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef OPENDEV_H
 #define OPENDEV_H 1
 
-int SProcXOpenDevice(ClientPtr  /* client */
-    );
-
 int ProcXOpenDevice(ClientPtr   /* client */
     );
 
diff --git a/Xi/queryst.c b/Xi/queryst.c
index 6c665e698..ca386f5dc 100644
--- a/Xi/queryst.c
+++ b/Xi/queryst.c
@@ -47,18 +47,6 @@ from The Open Group.
 #include "xkbstr.h"
 #include "queryst.h"
 
-/***********************************************************************
- *
- * This procedure allows a client to query the state of a device.
- *
- */
-
-int _X_COLD
-SProcXQueryDeviceState(ClientPtr client)
-{
-    return (ProcXQueryDeviceState(client));
-}
-
 /***********************************************************************
  *
  * This procedure allows frozen events to be routed.
diff --git a/Xi/queryst.h b/Xi/queryst.h
index 5619ca59d..a271edf71 100644
--- a/Xi/queryst.h
+++ b/Xi/queryst.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef QUERYST_H
 #define QUERYST_H 1
 
-int SProcXQueryDeviceState(ClientPtr    /* client */
-    );
-
 int ProcXQueryDeviceState(ClientPtr     /* client */
     );
 
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index 7af6e6f08..4afa655fa 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -62,18 +62,6 @@ SOFTWARE.
 #include "exglobals.h"
 #include "setbmap.h"
 
-/***********************************************************************
- *
- * This procedure changes the button mapping.
- *
- */
-
-int _X_COLD
-SProcXSetDeviceButtonMapping(ClientPtr client)
-{
-    return (ProcXSetDeviceButtonMapping(client));
-}
-
 /***********************************************************************
  *
  * This procedure lists the input devices available to the server.
diff --git a/Xi/setbmap.h b/Xi/setbmap.h
index 8d73f23b4..b402692ce 100644
--- a/Xi/setbmap.h
+++ b/Xi/setbmap.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef SETBMAP_H
 #define SETBMAP_H 1
 
-int SProcXSetDeviceButtonMapping(ClientPtr      /* client */
-    );
-
 int ProcXSetDeviceButtonMapping(ClientPtr       /* client */
     );
 
diff --git a/Xi/setdval.c b/Xi/setdval.c
index 3f8b3675e..2127e6afe 100644
--- a/Xi/setdval.c
+++ b/Xi/setdval.c
@@ -62,18 +62,6 @@ SOFTWARE.
 #include "exglobals.h"
 #include "setdval.h"
 
-/***********************************************************************
- *
- * Handle a request from a client with a different byte order.
- *
- */
-
-int _X_COLD
-SProcXSetDeviceValuators(ClientPtr client)
-{
-    return (ProcXSetDeviceValuators(client));
-}
-
 /***********************************************************************
  *
  * This procedure sets the value of valuators on an extension input device.
diff --git a/Xi/setdval.h b/Xi/setdval.h
index 05642743a..452be2897 100644
--- a/Xi/setdval.h
+++ b/Xi/setdval.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef SETDVAL_H
 #define SETDVAL_H 1
 
-int SProcXSetDeviceValuators(ClientPtr  /* client */
-    );
-
 int ProcXSetDeviceValuators(ClientPtr   /* client */
     );
 
diff --git a/Xi/setmmap.c b/Xi/setmmap.c
index 4c1ce2c5e..1c8df53c2 100644
--- a/Xi/setmmap.c
+++ b/Xi/setmmap.c
@@ -63,19 +63,6 @@ SOFTWARE.
 #include "exglobals.h"
 #include "setmmap.h"
 
-/***********************************************************************
- *
- * This procedure sets the modifier mapping for an extension device,
- * for clients on machines with a different byte ordering than the server.
- *
- */
-
-int _X_COLD
-SProcXSetDeviceModifierMapping(ClientPtr client)
-{
-    return (ProcXSetDeviceModifierMapping(client));
-}
-
 /***********************************************************************
  *
  * Set the device Modifier mapping.
diff --git a/Xi/setmmap.h b/Xi/setmmap.h
index 9347b9679..f8b96a875 100644
--- a/Xi/setmmap.h
+++ b/Xi/setmmap.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef SETMMAP_H
 #define SETMMAP_H 1
 
-int SProcXSetDeviceModifierMapping(ClientPtr    /* client */
-    );
-
 int ProcXSetDeviceModifierMapping(ClientPtr     /* client */
     );
 
diff --git a/Xi/setmode.c b/Xi/setmode.c
index bae3838b0..9c9476134 100644
--- a/Xi/setmode.c
+++ b/Xi/setmode.c
@@ -62,18 +62,6 @@ SOFTWARE.
 #include "exglobals.h"
 #include "setmode.h"
 
-/***********************************************************************
- *
- * Handle a request from a client with a different byte order.
- *
- */
-
-int _X_COLD
-SProcXSetDeviceMode(ClientPtr client)
-{
-    return (ProcXSetDeviceMode(client));
-}
-
 /***********************************************************************
  *
  * This procedure sets the mode of a device.
diff --git a/Xi/setmode.h b/Xi/setmode.h
index d01bfffd3..cc906c735 100644
--- a/Xi/setmode.h
+++ b/Xi/setmode.h
@@ -30,9 +30,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #ifndef SETMODE_H
 #define SETMODE_H 1
 
-int SProcXSetDeviceMode(ClientPtr       /* client */
-    );
-
 int ProcXSetDeviceMode(ClientPtr        /* client */
     );
 
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index 709c8f12a..a6e3171ee 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -128,12 +128,6 @@ XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
  *
  */
 
-int _X_COLD
-SProcXIChangeHierarchy(ClientPtr client)
-{
-    return (ProcXIChangeHierarchy(client));
-}
-
 static int
 add_master(ClientPtr client, xXIAddMasterInfo * c, int flags[MAXDEVICES])
 {
diff --git a/Xi/xichangehierarchy.h b/Xi/xichangehierarchy.h
index 649b654e5..8fa3a66e7 100644
--- a/Xi/xichangehierarchy.h
+++ b/Xi/xichangehierarchy.h
@@ -36,7 +36,6 @@
 #ifndef CHDEVHIER_H
 #define CHDEVHIER_H 1
 
-int SProcXIChangeHierarchy(ClientPtr /* client */ );
 int ProcXIChangeHierarchy(ClientPtr /* client */ );
 
 void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]);
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 903f82a5e..8db6b03d1 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -1013,12 +1013,6 @@ ProcXGetDeviceProperty(ClientPtr client)
     return Success;
 }
 
-int _X_COLD
-SProcXListDeviceProperties(ClientPtr client)
-{
-    return (ProcXListDeviceProperties(client));
-}
-
 int _X_COLD
 SProcXChangeDeviceProperty(ClientPtr client)
 {
diff --git a/Xi/xiproperty.h b/Xi/xiproperty.h
index 482c834ed..561779f2e 100644
--- a/Xi/xiproperty.h
+++ b/Xi/xiproperty.h
@@ -36,7 +36,6 @@ int ProcXDeleteDeviceProperty(ClientPtr client);
 int ProcXGetDeviceProperty(ClientPtr client);
 
 /* request swapping */
-int SProcXListDeviceProperties(ClientPtr client);
 int SProcXChangeDeviceProperty(ClientPtr client);
 int SProcXDeleteDeviceProperty(ClientPtr client);
 int SProcXGetDeviceProperty(ClientPtr client);
commit dc9a998b967b40831a7c23a7b33c5e2a54bdbf15
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 12:21:06 2024 +0200

    Xext: xv: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index da51fb432..8a315b90a 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1115,12 +1115,6 @@ ProcXvDispatch(ClientPtr client)
 
 /* Swapped Procs */
 
-static int _X_COLD
-SProcXvQueryExtension(ClientPtr client)
-{
-    return XvProcVector[xv_QueryExtension] (client);
-}
-
 static int _X_COLD
 SProcXvQueryAdaptors(ClientPtr client)
 {
@@ -1378,7 +1372,7 @@ SProcXvListImageFormats(ClientPtr client)
 }
 
 static int (*SXvProcVector[xvNumRequests]) (ClientPtr) = {
-SProcXvQueryExtension,
+        ProcXvQueryExtension,
         SProcXvQueryAdaptors,
         SProcXvQueryEncodings,
         SProcXvGrabPort,
commit 753e6c44baef1dec3b0ef04b05b322940b4e10e3
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 12:24:26 2024 +0200

    Xext: xtest: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xtest.c b/Xext/xtest.c
index 634b2ca48..230f0356c 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -538,12 +538,6 @@ SProcXTestFakeInput(ClientPtr client)
     return ProcXTestFakeInput(client);
 }
 
-static int _X_COLD
-SProcXTestGrabControl(ClientPtr client)
-{
-    return ProcXTestGrabControl(client);
-}
-
 static int _X_COLD
 SProcXTestDispatch(ClientPtr client)
 {
@@ -556,7 +550,7 @@ SProcXTestDispatch(ClientPtr client)
     case X_XTestFakeInput:
         return SProcXTestFakeInput(client);
     case X_XTestGrabControl:
-        return SProcXTestGrabControl(client);
+        return ProcXTestGrabControl(client);
     default:
         return BadRequest;
     }
commit 0c87f9b1da8474e562a07928f191699ef71d1716
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 14:03:20 2024 +0200

    Xext: xcmisc: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index 1e4765d9a..dff21efb1 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -150,12 +150,6 @@ SProcXCMiscGetVersion(ClientPtr client)
     return ProcXCMiscGetVersion(client);
 }
 
-static int _X_COLD
-SProcXCMiscGetXIDRange(ClientPtr client)
-{
-    return ProcXCMiscGetXIDRange(client);
-}
-
 static int _X_COLD
 SProcXCMiscGetXIDList(ClientPtr client)
 {
@@ -174,7 +168,7 @@ SProcXCMiscDispatch(ClientPtr client)
     case X_XCMiscGetVersion:
         return SProcXCMiscGetVersion(client);
     case X_XCMiscGetXIDRange:
-        return SProcXCMiscGetXIDRange(client);
+        return ProcXCMiscGetXIDRange(client);
     case X_XCMiscGetXIDList:
         return SProcXCMiscGetXIDList(client);
     default:
commit 9a3daf908c6c141138f524896fc4446e51162042
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:59:58 2024 +0200

    Xext: vidmode: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/vidmode.c b/Xext/vidmode.c
index 7fb843d5a..06b710288 100644
--- a/Xext/vidmode.c
+++ b/Xext/vidmode.c
@@ -1701,12 +1701,6 @@ ProcVidModeDispatch(ClientPtr client)
     }
 }
 
-static int _X_COLD
-SProcVidModeQueryVersion(ClientPtr client)
-{
-    return ProcVidModeQueryVersion(client);
-}
-
 static int _X_COLD
 SProcVidModeGetModeLine(ClientPtr client)
 {
@@ -2044,7 +2038,7 @@ SProcVidModeDispatch(ClientPtr client)
     REQUEST(xReq);
     switch (stuff->data) {
     case X_XF86VidModeQueryVersion:
-        return SProcVidModeQueryVersion(client);
+        return ProcVidModeQueryVersion(client);
     case X_XF86VidModeGetModeLine:
         return SProcVidModeGetModeLine(client);
     case X_XF86VidModeGetMonitor:
commit 3bb15b3e042ed93c394012efa096d155745b5a05
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:55:21 2024 +0200

    Xext: sync: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/sync.c b/Xext/sync.c
index 75f13ea59..b6417b3b0 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2151,18 +2151,6 @@ ProcSyncDispatch(ClientPtr client)
  * Boring Swapping stuff ...
  */
 
-static int _X_COLD
-SProcSyncInitialize(ClientPtr client)
-{
-    return ProcSyncInitialize(client);
-}
-
-static int _X_COLD
-SProcSyncListSystemCounters(ClientPtr client)
-{
-    return ProcSyncListSystemCounters(client);
-}
-
 static int _X_COLD
 SProcSyncCreateCounter(ClientPtr client)
 {
@@ -2361,9 +2349,9 @@ SProcSyncDispatch(ClientPtr client)
 
     switch (stuff->data) {
     case X_SyncInitialize:
-        return SProcSyncInitialize(client);
+        return ProcSyncInitialize(client);
     case X_SyncListSystemCounters:
-        return SProcSyncListSystemCounters(client);
+        return ProcSyncListSystemCounters(client);
     case X_SyncCreateCounter:
         return SProcSyncCreateCounter(client);
     case X_SyncSetCounter:
commit c8c42490b74acbe8f3a0007b747a185edc50fa47
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:53:02 2024 +0200

    Xext: shm: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/shm.c b/Xext/shm.c
index 6c0c68b5a..2fba1820a 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1386,12 +1386,6 @@ SShmCompletionEvent(xShmCompletionEvent * from, xShmCompletionEvent * to)
     cpswapl(from->offset, to->offset);
 }
 
-static int _X_COLD
-SProcShmQueryVersion(ClientPtr client)
-{
-    return ProcShmQueryVersion(client);
-}
-
 static int _X_COLD
 SProcShmAttach(ClientPtr client)
 {
@@ -1489,7 +1483,7 @@ SProcShmDispatch(ClientPtr client)
     REQUEST(xReq);
 
     if (stuff->data == X_ShmQueryVersion)
-        return SProcShmQueryVersion(client);
+        return ProcShmQueryVersion(client);
 
     if (!client->local)
         return BadRequest;
commit a7bdfdb3b5a19d62eef6f34d18f0a28e15287039
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:51:15 2024 +0200

    Xext: shape: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/shape.c b/Xext/shape.c
index 464170fc0..65c55699f 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -1061,12 +1061,6 @@ SShapeNotifyEvent(xShapeNotifyEvent * from, xShapeNotifyEvent * to)
     to->shaped = from->shaped;
 }
 
-static int _X_COLD
-SProcShapeQueryVersion(ClientPtr client)
-{
-    return ProcShapeQueryVersion(client);
-}
-
 static int _X_COLD
 SProcShapeRectangles(ClientPtr client)
 {
@@ -1156,7 +1150,7 @@ SProcShapeDispatch(ClientPtr client)
     REQUEST(xReq);
     switch (stuff->data) {
     case X_ShapeQueryVersion:
-        return SProcShapeQueryVersion(client);
+        return ProcShapeQueryVersion(client);
     case X_ShapeRectangles:
         return SProcShapeRectangles(client);
     case X_ShapeMask:
commit 07131dccc5e389fe039e33afae6a7e8248646c24
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:48:51 2024 +0200

    Xext: saver: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/saver.c b/Xext/saver.c
index b0231b031..edb5102c3 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -1272,12 +1272,6 @@ ProcScreenSaverDispatch(ClientPtr client)
     return BadRequest;
 }
 
-static int _X_COLD
-SProcScreenSaverQueryVersion(ClientPtr client)
-{
-    return ProcScreenSaverQueryVersion(client);
-}
-
 static int _X_COLD
 SProcScreenSaverQueryInfo(ClientPtr client)
 {
@@ -1333,7 +1327,7 @@ SProcScreenSaverSuspend(ClientPtr client)
 }
 
 static int (*SwappedVector[]) (ClientPtr /* client */ ) = {
-SProcScreenSaverQueryVersion,
+        ProcScreenSaverQueryVersion,
         SProcScreenSaverQueryInfo,
         SProcScreenSaverSelectInput,
         SProcScreenSaverSetAttributes,
commit 515992b046e8b6193256c7e9a0a5951ec11eaeaa
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:45:30 2024 +0200

    Xext: panoramiX: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c
index 2856a8441..9546251b3 100644
--- a/Xext/panoramiXSwap.c
+++ b/Xext/panoramiXSwap.c
@@ -45,12 +45,6 @@ Equipment Corporation.
 #include "globals.h"
 #include "panoramiXh.h"
 
-static int _X_COLD
-SProcPanoramiXQueryVersion(ClientPtr client)
-{
-    return ProcPanoramiXQueryVersion(client);
-}
-
 static int _X_COLD
 SProcPanoramiXGetState(ClientPtr client)
 {
@@ -79,25 +73,13 @@ SProcPanoramiXGetScreenSize(ClientPtr client)
     return ProcPanoramiXGetScreenSize(client);
 }
 
-static int _X_COLD
-SProcXineramaIsActive(ClientPtr client)
-{
-    return ProcXineramaIsActive(client);
-}
-
-static int _X_COLD
-SProcXineramaQueryScreens(ClientPtr client)
-{
-    return ProcXineramaQueryScreens(client);
-}
-
 int _X_COLD
 SProcPanoramiXDispatch(ClientPtr client)
 {
     REQUEST(xReq);
     switch (stuff->data) {
     case X_PanoramiXQueryVersion:
-        return SProcPanoramiXQueryVersion(client);
+        return ProcPanoramiXQueryVersion(client);
     case X_PanoramiXGetState:
         return SProcPanoramiXGetState(client);
     case X_PanoramiXGetScreenCount:
@@ -105,9 +87,9 @@ SProcPanoramiXDispatch(ClientPtr client)
     case X_PanoramiXGetScreenSize:
         return SProcPanoramiXGetScreenSize(client);
     case X_XineramaIsActive:
-        return SProcXineramaIsActive(client);
+        return ProcXineramaIsActive(client);
     case X_XineramaQueryScreens:
-        return SProcXineramaQueryScreens(client);
+        return ProcXineramaQueryScreens(client);
     }
     return BadRequest;
 }
commit 98dbd817f6baa906a2f89765912bebb267cbd91b
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 12:37:41 2024 +0200

    Xext: dpms: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/dpms.c b/Xext/dpms.c
index 88716f90a..c4194259d 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -499,18 +499,6 @@ SProcDPMSGetVersion(ClientPtr client)
     return ProcDPMSGetVersion(client);
 }
 
-static int _X_COLD
-SProcDPMSCapable(ClientPtr client)
-{
-    return ProcDPMSCapable(client);
-}
-
-static int _X_COLD
-SProcDPMSGetTimeouts(ClientPtr client)
-{
-    return ProcDPMSGetTimeouts(client);
-}
-
 static int _X_COLD
 SProcDPMSSetTimeouts(ClientPtr client)
 {
@@ -523,18 +511,6 @@ SProcDPMSSetTimeouts(ClientPtr client)
     return ProcDPMSSetTimeouts(client);
 }
 
-static int _X_COLD
-SProcDPMSEnable(ClientPtr client)
-{
-    return ProcDPMSEnable(client);
-}
-
-static int _X_COLD
-SProcDPMSDisable(ClientPtr client)
-{
-    return ProcDPMSDisable(client);
-}
-
 static int _X_COLD
 SProcDPMSForceLevel(ClientPtr client)
 {
@@ -546,12 +522,6 @@ SProcDPMSForceLevel(ClientPtr client)
     return ProcDPMSForceLevel(client);
 }
 
-static int _X_COLD
-SProcDPMSInfo(ClientPtr client)
-{
-    return ProcDPMSInfo(client);
-}
-
 static int _X_COLD
 SProcDPMSSelectInput(ClientPtr client)
 {
@@ -571,19 +541,19 @@ SProcDPMSDispatch(ClientPtr client)
     case X_DPMSGetVersion:
         return SProcDPMSGetVersion(client);
     case X_DPMSCapable:
-        return SProcDPMSCapable(client);
+        return ProcDPMSCapable(client);
     case X_DPMSGetTimeouts:
-        return SProcDPMSGetTimeouts(client);
+        return ProcDPMSGetTimeouts(client);
     case X_DPMSSetTimeouts:
         return SProcDPMSSetTimeouts(client);
     case X_DPMSEnable:
-        return SProcDPMSEnable(client);
+        return ProcDPMSEnable(client);
     case X_DPMSDisable:
-        return SProcDPMSDisable(client);
+        return ProcDPMSDisable(client);
     case X_DPMSForceLevel:
         return SProcDPMSForceLevel(client);
     case X_DPMSInfo:
-        return SProcDPMSInfo(client);
+        return ProcDPMSInfo(client);
     case X_DPMSSelectInput:
         return SProcDPMSSelectInput(client);
     default:
commit 0da419246efd48e3efb2cb101ab7236de39cf92f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:43:14 2024 +0200

    randr: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index b503ce6dd..e2f489ae0 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -337,12 +337,6 @@ ProcRRXineramaDispatch(ClientPtr client)
 
 /* SProc */
 
-static int _X_COLD
-SProcRRXineramaQueryVersion(ClientPtr client)
-{
-    return ProcRRXineramaQueryVersion(client);
-}
-
 static int _X_COLD
 SProcRRXineramaGetState(ClientPtr client)
 {
@@ -371,25 +365,13 @@ SProcRRXineramaGetScreenSize(ClientPtr client)
     return ProcRRXineramaGetScreenSize(client);
 }
 
-static int _X_COLD
-SProcRRXineramaIsActive(ClientPtr client)
-{
-    return ProcRRXineramaIsActive(client);
-}
-
-static int _X_COLD
-SProcRRXineramaQueryScreens(ClientPtr client)
-{
-    return ProcRRXineramaQueryScreens(client);
-}
-
 int
 SProcRRXineramaDispatch(ClientPtr client)
 {
     REQUEST(xReq);
     switch (stuff->data) {
     case X_PanoramiXQueryVersion:
-        return SProcRRXineramaQueryVersion(client);
+        return ProcRRXineramaQueryVersion(client);
     case X_PanoramiXGetState:
         return SProcRRXineramaGetState(client);
     case X_PanoramiXGetScreenCount:
@@ -397,9 +379,9 @@ SProcRRXineramaDispatch(ClientPtr client)
     case X_PanoramiXGetScreenSize:
         return SProcRRXineramaGetScreenSize(client);
     case X_XineramaIsActive:
-        return SProcRRXineramaIsActive(client);
+        return ProcRRXineramaIsActive(client);
     case X_XineramaQueryScreens:
-        return SProcRRXineramaQueryScreens(client);
+        return ProcRRXineramaQueryScreens(client);
     }
     return BadRequest;
 }
commit 851ce5c6a83579184976020419128c2e63ca4218
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 12:11:16 2024 +0200

    dbe: drop now obsolete swap procs
    
    Several SProc's have become no-ops, just calling the actual Proc's,
    so we can get rid of them entirely.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/dbe/dbe.c b/dbe/dbe.c
index 044e45719..94ba8ddb9 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -797,29 +797,7 @@ ProcDbeDispatch(ClientPtr client)
     }
 
 }                               /* ProcDbeDispatch() */
-

-/******************************************************************************
- *
- * DBE DIX Procedure: SProcDbeGetVersion
- *
- * Description:
- *
- *     This function is for processing a DbeGetVersion request on a swapped
- *     server.  This request returns the major and minor version numbers of
- *     this extension.
- *
- * Return Values:
- *
- *     Success
- *
- *****************************************************************************/
 
-static int _X_COLD
-SProcDbeGetVersion(ClientPtr client)
-{
-    return (ProcDbeGetVersion(client));
-}                               /* SProcDbeGetVersion() */
-

 /******************************************************************************
  *
  * DBE DIX Procedure: SProcDbeAllocateBackBufferName
@@ -1012,7 +990,7 @@ SProcDbeDispatch(ClientPtr client)
 
     switch (stuff->data) {
     case X_DbeGetVersion:
-        return (SProcDbeGetVersion(client));
+        return ProcDbeGetVersion(client);
 
     case X_DbeAllocateBackBufferName:
         return (SProcDbeAllocateBackBufferName(client));
commit 4c3ff757729ab14c6a31a95b10d8eebd8eb7e6a1
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:26:50 2024 +0200

    dix: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Also dropping now obsolete SProcNoOperation().
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/dix/swapreq.c b/dix/swapreq.c
index 7f6b057a4..9031f083d 100644
--- a/dix/swapreq.c
+++ b/dix/swapreq.c
@@ -118,7 +118,6 @@ int _X_COLD
 SProcSimpleReq(ClientPtr client)
 {
     REQUEST(xReq);
-    swaps(&stuff->length);
     return (*ProcVector[stuff->reqType]) (client);
 }
 
@@ -129,7 +128,6 @@ int _X_COLD
 SProcResourceReq(ClientPtr client)
 {
     REQUEST(xResourceReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xResourceReq);        /* not EXACT */
     swapl(&stuff->id);
     return (*ProcVector[stuff->reqType]) (client);
@@ -139,7 +137,6 @@ int _X_COLD
 SProcCreateWindow(ClientPtr client)
 {
     REQUEST(xCreateWindowReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xCreateWindowReq);
     swapl(&stuff->wid);
     swapl(&stuff->parent);
@@ -159,7 +156,6 @@ int _X_COLD
 SProcChangeWindowAttributes(ClientPtr client)
 {
     REQUEST(xChangeWindowAttributesReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq);
     swapl(&stuff->window);
     swapl(&stuff->valueMask);
@@ -171,7 +167,6 @@ int _X_COLD
 SProcReparentWindow(ClientPtr client)
 {
     REQUEST(xReparentWindowReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xReparentWindowReq);
     swapl(&stuff->window);
     swapl(&stuff->parent);
@@ -184,7 +179,6 @@ int _X_COLD
 SProcConfigureWindow(ClientPtr client)
 {
     REQUEST(xConfigureWindowReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xConfigureWindowReq);
     swapl(&stuff->window);
     swaps(&stuff->mask);
@@ -197,7 +191,6 @@ int _X_COLD
 SProcInternAtom(ClientPtr client)
 {
     REQUEST(xInternAtomReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xInternAtomReq);
     swaps(&stuff->nbytes);
     return ((*ProcVector[X_InternAtom]) (client));
@@ -207,7 +200,6 @@ int _X_COLD
 SProcChangeProperty(ClientPtr client)
 {
     REQUEST(xChangePropertyReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangePropertyReq);
     swapl(&stuff->window);
     swapl(&stuff->property);
@@ -230,19 +222,16 @@ int _X_COLD
 SProcDeleteProperty(ClientPtr client)
 {
     REQUEST(xDeletePropertyReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDeletePropertyReq);
     swapl(&stuff->window);
     swapl(&stuff->property);
     return ((*ProcVector[X_DeleteProperty]) (client));
-
 }
 
 int _X_COLD
 SProcGetProperty(ClientPtr client)
 {
     REQUEST(xGetPropertyReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGetPropertyReq);
     swapl(&stuff->window);
     swapl(&stuff->property);
@@ -256,7 +245,6 @@ int _X_COLD
 SProcSetSelectionOwner(ClientPtr client)
 {
     REQUEST(xSetSelectionOwnerReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSetSelectionOwnerReq);
     swapl(&stuff->window);
     swapl(&stuff->selection);
@@ -268,7 +256,6 @@ int _X_COLD
 SProcConvertSelection(ClientPtr client)
 {
     REQUEST(xConvertSelectionReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xConvertSelectionReq);
     swapl(&stuff->requestor);
     swapl(&stuff->selection);
@@ -285,7 +272,6 @@ SProcSendEvent(ClientPtr client)
     EventSwapPtr proc;
 
     REQUEST(xSendEventReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSendEventReq);
     swapl(&stuff->destination);
     swapl(&stuff->eventMask);
@@ -311,7 +297,6 @@ int _X_COLD
 SProcGrabPointer(ClientPtr client)
 {
     REQUEST(xGrabPointerReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGrabPointerReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->eventMask);
@@ -325,7 +310,6 @@ int _X_COLD
 SProcGrabButton(ClientPtr client)
 {
     REQUEST(xGrabButtonReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGrabButtonReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->eventMask);
@@ -339,7 +323,6 @@ int _X_COLD
 SProcUngrabButton(ClientPtr client)
 {
     REQUEST(xUngrabButtonReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xUngrabButtonReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->modifiers);
@@ -350,7 +333,6 @@ int _X_COLD
 SProcChangeActivePointerGrab(ClientPtr client)
 {
     REQUEST(xChangeActivePointerGrabReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq);
     swapl(&stuff->cursor);
     swapl(&stuff->time);
@@ -362,7 +344,6 @@ int _X_COLD
 SProcGrabKeyboard(ClientPtr client)
 {
     REQUEST(xGrabKeyboardReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGrabKeyboardReq);
     swapl(&stuff->grabWindow);
     swapl(&stuff->time);
@@ -373,7 +354,6 @@ int _X_COLD
 SProcGrabKey(ClientPtr client)
 {
     REQUEST(xGrabKeyReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGrabKeyReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->modifiers);
@@ -384,7 +364,6 @@ int _X_COLD
 SProcUngrabKey(ClientPtr client)
 {
     REQUEST(xUngrabKeyReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xUngrabKeyReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->modifiers);
@@ -395,7 +374,6 @@ int _X_COLD
 SProcGetMotionEvents(ClientPtr client)
 {
     REQUEST(xGetMotionEventsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGetMotionEventsReq);
     swapl(&stuff->window);
     swapl(&stuff->start);
@@ -407,7 +385,6 @@ int _X_COLD
 SProcTranslateCoords(ClientPtr client)
 {
     REQUEST(xTranslateCoordsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xTranslateCoordsReq);
     swapl(&stuff->srcWid);
     swapl(&stuff->dstWid);
@@ -420,7 +397,6 @@ int _X_COLD
 SProcWarpPointer(ClientPtr client)
 {
     REQUEST(xWarpPointerReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xWarpPointerReq);
     swapl(&stuff->srcWid);
     swapl(&stuff->dstWid);
@@ -437,7 +413,6 @@ int _X_COLD
 SProcSetInputFocus(ClientPtr client)
 {
     REQUEST(xSetInputFocusReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSetInputFocusReq);
     swapl(&stuff->focus);
     swapl(&stuff->time);
@@ -448,7 +423,6 @@ int _X_COLD
 SProcOpenFont(ClientPtr client)
 {
     REQUEST(xOpenFontReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xOpenFontReq);
     swapl(&stuff->fid);
     swaps(&stuff->nbytes);
@@ -459,7 +433,6 @@ int _X_COLD
 SProcListFonts(ClientPtr client)
 {
     REQUEST(xListFontsReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xListFontsReq);
     swaps(&stuff->maxNames);
     swaps(&stuff->nbytes);
@@ -470,7 +443,6 @@ int _X_COLD
 SProcListFontsWithInfo(ClientPtr client)
 {
     REQUEST(xListFontsWithInfoReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq);
     swaps(&stuff->maxNames);
     swaps(&stuff->nbytes);
@@ -481,7 +453,6 @@ int _X_COLD
 SProcSetFontPath(ClientPtr client)
 {
     REQUEST(xSetFontPathReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSetFontPathReq);
     swaps(&stuff->nFonts);
     return ((*ProcVector[X_SetFontPath]) (client));
@@ -491,8 +462,6 @@ int _X_COLD
 SProcCreatePixmap(ClientPtr client)
 {
     REQUEST(xCreatePixmapReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCreatePixmapReq);
     swapl(&stuff->pid);
     swapl(&stuff->drawable);
@@ -505,7 +474,6 @@ int _X_COLD
 SProcCreateGC(ClientPtr client)
 {
     REQUEST(xCreateGCReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xCreateGCReq);
     swapl(&stuff->gc);
     swapl(&stuff->drawable);
@@ -518,7 +486,6 @@ int _X_COLD
 SProcChangeGC(ClientPtr client)
 {
     REQUEST(xChangeGCReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeGCReq);
     swapl(&stuff->gc);
     swapl(&stuff->mask);
@@ -530,7 +497,6 @@ int _X_COLD
 SProcCopyGC(ClientPtr client)
 {
     REQUEST(xCopyGCReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCopyGCReq);
     swapl(&stuff->srcGC);
     swapl(&stuff->dstGC);
@@ -542,20 +508,17 @@ int _X_COLD
 SProcSetDashes(ClientPtr client)
 {
     REQUEST(xSetDashesReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSetDashesReq);
     swapl(&stuff->gc);
     swaps(&stuff->dashOffset);
     swaps(&stuff->nDashes);
     return ((*ProcVector[X_SetDashes]) (client));
-
 }
 
 int _X_COLD
 SProcSetClipRectangles(ClientPtr client)
 {
     REQUEST(xSetClipRectanglesReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
     swapl(&stuff->gc);
     swaps(&stuff->xOrigin);
@@ -568,7 +531,6 @@ int _X_COLD
 SProcClearToBackground(ClientPtr client)
 {
     REQUEST(xClearAreaReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xClearAreaReq);
     swapl(&stuff->window);
     swaps(&stuff->x);
@@ -582,7 +544,6 @@ int _X_COLD
 SProcCopyArea(ClientPtr client)
 {
     REQUEST(xCopyAreaReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCopyAreaReq);
     swapl(&stuff->srcDrawable);
     swapl(&stuff->dstDrawable);
@@ -600,7 +561,6 @@ int _X_COLD
 SProcCopyPlane(ClientPtr client)
 {
     REQUEST(xCopyPlaneReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCopyPlaneReq);
     swapl(&stuff->srcDrawable);
     swapl(&stuff->dstDrawable);
@@ -621,7 +581,6 @@ int _X_COLD
 SProcPoly(ClientPtr client)
 {
     REQUEST(xPolyPointReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xPolyPointReq);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -636,7 +595,6 @@ int _X_COLD
 SProcFillPoly(ClientPtr client)
 {
     REQUEST(xFillPolyReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xFillPolyReq);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -648,7 +606,6 @@ int _X_COLD
 SProcPutImage(ClientPtr client)
 {
     REQUEST(xPutImageReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xPutImageReq);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -658,14 +615,12 @@ SProcPutImage(ClientPtr client)
     swaps(&stuff->dstY);
     /* Image should already be swapped */
     return ((*ProcVector[X_PutImage]) (client));
-
 }
 
 int _X_COLD
 SProcGetImage(ClientPtr client)
 {
     REQUEST(xGetImageReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGetImageReq);
     swapl(&stuff->drawable);
     swaps(&stuff->x);
@@ -682,7 +637,6 @@ int _X_COLD
 SProcPolyText(ClientPtr client)
 {
     REQUEST(xPolyTextReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xPolyTextReq);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -697,7 +651,6 @@ int _X_COLD
 SProcImageText(ClientPtr client)
 {
     REQUEST(xImageTextReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xImageTextReq);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -710,7 +663,6 @@ int _X_COLD
 SProcCreateColormap(ClientPtr client)
 {
     REQUEST(xCreateColormapReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCreateColormapReq);
     swapl(&stuff->mid);
     swapl(&stuff->window);
@@ -722,19 +674,16 @@ int _X_COLD
 SProcCopyColormapAndFree(ClientPtr client)
 {
     REQUEST(xCopyColormapAndFreeReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
     swapl(&stuff->mid);
     swapl(&stuff->srcCmap);
     return ((*ProcVector[X_CopyColormapAndFree]) (client));
-
 }
 
 int _X_COLD
 SProcAllocColor(ClientPtr client)
 {
     REQUEST(xAllocColorReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAllocColorReq);
     swapl(&stuff->cmap);
     swaps(&stuff->red);
@@ -747,7 +696,6 @@ int _X_COLD
 SProcAllocNamedColor(ClientPtr client)
 {
     REQUEST(xAllocNamedColorReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xAllocNamedColorReq);
     swapl(&stuff->cmap);
     swaps(&stuff->nbytes);
@@ -758,7 +706,6 @@ int _X_COLD
 SProcAllocColorCells(ClientPtr client)
 {
     REQUEST(xAllocColorCellsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAllocColorCellsReq);
     swapl(&stuff->cmap);
     swaps(&stuff->colors);
@@ -770,7 +717,6 @@ int _X_COLD
 SProcAllocColorPlanes(ClientPtr client)
 {
     REQUEST(xAllocColorPlanesReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
     swapl(&stuff->cmap);
     swaps(&stuff->colors);
@@ -784,13 +730,11 @@ int _X_COLD
 SProcFreeColors(ClientPtr client)
 {
     REQUEST(xFreeColorsReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
     swapl(&stuff->cmap);
     swapl(&stuff->planeMask);
     SwapRestL(stuff);
     return ((*ProcVector[X_FreeColors]) (client));
-
 }
 
 void _X_COLD
@@ -809,7 +753,6 @@ SProcStoreColors(ClientPtr client)
     xColorItem *pItem;
 
     REQUEST(xStoreColorsReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
     swapl(&stuff->cmap);
     pItem = (xColorItem *) &stuff[1];
@@ -822,7 +765,6 @@ int _X_COLD
 SProcStoreNamedColor(ClientPtr client)
 {
     REQUEST(xStoreNamedColorReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq);
     swapl(&stuff->cmap);
     swapl(&stuff->pixel);
@@ -834,7 +776,6 @@ int _X_COLD
 SProcQueryColors(ClientPtr client)
 {
     REQUEST(xQueryColorsReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
     swapl(&stuff->cmap);
     SwapRestL(stuff);
@@ -845,7 +786,6 @@ int _X_COLD
 SProcLookupColor(ClientPtr client)
 {
     REQUEST(xLookupColorReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xLookupColorReq);
     swapl(&stuff->cmap);
     swaps(&stuff->nbytes);
@@ -856,7 +796,6 @@ int _X_COLD
 SProcCreateCursor(ClientPtr client)
 {
     REQUEST(xCreateCursorReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCreateCursorReq);
     swapl(&stuff->cid);
     swapl(&stuff->source);
@@ -876,7 +815,6 @@ int _X_COLD
 SProcCreateGlyphCursor(ClientPtr client)
 {
     REQUEST(xCreateGlyphCursorReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCreateGlyphCursorReq);
     swapl(&stuff->cid);
     swapl(&stuff->source);
@@ -896,7 +834,6 @@ int _X_COLD
 SProcRecolorCursor(ClientPtr client)
 {
     REQUEST(xRecolorCursorReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xRecolorCursorReq);
     swapl(&stuff->cursor);
     swaps(&stuff->foreRed);
@@ -912,20 +849,17 @@ int _X_COLD
 SProcQueryBestSize(ClientPtr client)
 {
     REQUEST(xQueryBestSizeReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xQueryBestSizeReq);
     swapl(&stuff->drawable);
     swaps(&stuff->width);
     swaps(&stuff->height);
     return ((*ProcVector[X_QueryBestSize]) (client));
-
 }
 
 int _X_COLD
 SProcQueryExtension(ClientPtr client)
 {
     REQUEST(xQueryExtensionReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xQueryExtensionReq);
     swaps(&stuff->nbytes);
     return ((*ProcVector[X_QueryExtension]) (client));
@@ -935,7 +869,6 @@ int _X_COLD
 SProcChangeKeyboardMapping(ClientPtr client)
 {
     REQUEST(xChangeKeyboardMappingReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq);
     SwapRestL(stuff);
     return ((*ProcVector[X_ChangeKeyboardMapping]) (client));
@@ -945,7 +878,6 @@ int _X_COLD
 SProcChangeKeyboardControl(ClientPtr client)
 {
     REQUEST(xChangeKeyboardControlReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq);
     swapl(&stuff->mask);
     SwapRestL(stuff);
@@ -956,7 +888,6 @@ int _X_COLD
 SProcChangePointerControl(ClientPtr client)
 {
     REQUEST(xChangePointerControlReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xChangePointerControlReq);
     swaps(&stuff->accelNum);
     swaps(&stuff->accelDenum);
@@ -968,7 +899,6 @@ int _X_COLD
 SProcSetScreenSaver(ClientPtr client)
 {
     REQUEST(xSetScreenSaverReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSetScreenSaverReq);
     swaps(&stuff->timeout);
     swaps(&stuff->interval);
@@ -979,18 +909,15 @@ int _X_COLD
 SProcChangeHosts(ClientPtr client)
 {
     REQUEST(xChangeHostsReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeHostsReq);
     swaps(&stuff->hostLength);
     return ((*ProcVector[X_ChangeHosts]) (client));
-
 }
 
 int _X_COLD
 SProcRotateProperties(ClientPtr client)
 {
     REQUEST(xRotatePropertiesReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq);
     swapl(&stuff->window);
     swaps(&stuff->nAtoms);
@@ -999,14 +926,6 @@ SProcRotateProperties(ClientPtr client)
     return ((*ProcVector[X_RotateProperties]) (client));
 }
 
-int _X_COLD
-SProcNoOperation(ClientPtr client)
-{
-    REQUEST(xReq);
-    swaps(&stuff->length);
-    return ((*ProcVector[X_NoOperation]) (client));
-}
-
 void _X_COLD
 SwapConnClientPrefix(xConnClientPrefix * pCCP)
 {
diff --git a/dix/tables.c b/dix/tables.c
index 8f0c7634f..5da4ffb75 100644
--- a/dix/tables.c
+++ b/dix/tables.c
@@ -449,7 +449,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = {
     ProcBadRequest,
     ProcBadRequest,                     /* 125 */
     ProcBadRequest,
-    SProcNoOperation,
+    ProcNoOperation,
     ProcBadRequest,
     ProcBadRequest,
     ProcBadRequest,
diff --git a/include/swapreq.h b/include/swapreq.h
index 47d3f7307..bf6514670 100644
--- a/include/swapreq.h
+++ b/include/swapreq.h
@@ -70,7 +70,6 @@ int SProcInternAtom(ClientPtr client);
 int SProcListFonts(ClientPtr client);
 int SProcListFontsWithInfo(ClientPtr client);
 int SProcLookupColor(ClientPtr client);
-int SProcNoOperation(ClientPtr client);
 int SProcOpenFont(ClientPtr client);
 int SProcPoly(ClientPtr client);
 int SProcPolyText(ClientPtr client);
commit 643f91266e795a12f8cfb0ce07601ed2d3aa4415
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:25:57 2024 +0200

    xwin: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/hw/xwin/dri/windowsdri.c b/hw/xwin/dri/windowsdri.c
index 5ed4450da..5d4c5ea54 100644
--- a/hw/xwin/dri/windowsdri.c
+++ b/hw/xwin/dri/windowsdri.c
@@ -189,7 +189,6 @@ static int
 SProcWindowsDRIQueryVersion(ClientPtr client)
 {
     REQUEST(xWindowsDRIQueryVersionReq);
-    swaps(&stuff->length);
     return ProcWindowsDRIQueryVersion(client);
 }
 
@@ -197,7 +196,6 @@ static int
 SProcWindowsDRIQueryDirectRenderingCapable(ClientPtr client)
 {
     REQUEST(xWindowsDRIQueryDirectRenderingCapableReq);
-    swaps(&stuff->length);
     swapl(&stuff->screen);
     return ProcWindowsDRIQueryDirectRenderingCapable(client);
 }
@@ -206,7 +204,6 @@ static int
 SProcWindowsDRIQueryDrawable(ClientPtr client)
 {
     REQUEST(xWindowsDRIQueryDrawableReq);
-    swaps(&stuff->length);
     swapl(&stuff->screen);
     swapl(&stuff->drawable);
     return ProcWindowsDRIQueryDrawable(client);
@@ -216,7 +213,6 @@ static int
 SProcWindowsDRIFBConfigToPixelFormat(ClientPtr client)
 {
     REQUEST(xWindowsDRIFBConfigToPixelFormatReq);
-    swaps(&stuff->length);
     swapl(&stuff->screen);
     swapl(&stuff->fbConfigID);
     return ProcWindowsDRIFBConfigToPixelFormat(client);
commit 4cb141307cbd32ad08ed9d40cd1bdbccc51fc3c8
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:25:14 2024 +0200

    xwayland: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index a507b0e2f..29ce98c03 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -378,8 +378,6 @@ static int _X_COLD
 SProcXwlQueryVersion(ClientPtr client)
 {
     REQUEST(xXwlQueryVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXwlQueryVersionReq);
     swaps(&stuff->majorVersion);
     swaps(&stuff->minorVersion);
commit 65224a2f9ab9d6bf7cf9874767fb8e1cf7847580
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:23:39 2024 +0200

    xquartz: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 254931f0b..9a3c71a71 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -692,7 +692,6 @@ static int
 SProcAppleWMQueryVersion(register ClientPtr client)
 {
     REQUEST(xAppleWMQueryVersionReq);
-    swaps(&stuff->length);
     return ProcAppleWMQueryVersion(client);
 }
 
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index c9189c9d2..d04d6213b 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -397,7 +397,6 @@ static int
 SProcAppleDRIQueryVersion(register ClientPtr client)
 {
     REQUEST(xAppleDRIQueryVersionReq);
-    swaps(&stuff->length);
     return ProcAppleDRIQueryVersion(client);
 }
 
@@ -405,7 +404,6 @@ static int
 SProcAppleDRIQueryDirectRenderingCapable(register ClientPtr client)
 {
     REQUEST(xAppleDRIQueryDirectRenderingCapableReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAppleDRIQueryDirectRenderingCapableReq);
     swapl(&stuff->screen);
     return ProcAppleDRIQueryDirectRenderingCapable(client);
@@ -415,7 +413,6 @@ static int
 SProcAppleDRIAuthConnection(register ClientPtr client)
 {
     REQUEST(xAppleDRIAuthConnectionReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAppleDRIAuthConnectionReq);
     swapl(&stuff->screen);
     swapl(&stuff->magic);
@@ -426,7 +423,6 @@ static int
 SProcAppleDRICreateSurface(register ClientPtr client)
 {
     REQUEST(xAppleDRICreateSurfaceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAppleDRICreateSurfaceReq);
     swapl(&stuff->screen);
     swapl(&stuff->drawable);
@@ -438,7 +434,6 @@ static int
 SProcAppleDRIDestroySurface(register ClientPtr client)
 {
     REQUEST(xAppleDRIDestroySurfaceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq);
     swapl(&stuff->screen);
     swapl(&stuff->drawable);
@@ -449,7 +444,6 @@ static int
 SProcAppleDRICreatePixmap(register ClientPtr client)
 {
     REQUEST(xAppleDRICreatePixmapReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAppleDRICreatePixmapReq);
     swapl(&stuff->screen);
     swapl(&stuff->drawable);
@@ -460,7 +454,6 @@ static int
 SProcAppleDRIDestroyPixmap(register ClientPtr client)
 {
     REQUEST(xAppleDRIDestroyPixmapReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAppleDRIDestroyPixmapReq);
     swapl(&stuff->drawable);
     return ProcAppleDRIDestroyPixmap(client);
commit 7e5c342be1e742c32cd1beb36798a9b46cbf38a5
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:22:20 2024 +0200

    xfree86: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index b74544cad..139ad484d 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -562,8 +562,6 @@ ProcXF86DRIDispatch(register ClientPtr client)
 static int _X_COLD
 SProcXF86DRIQueryVersion(register ClientPtr client)
 {
-    REQUEST(xXF86DRIQueryVersionReq);
-    swaps(&stuff->length);
     return ProcXF86DRIQueryVersion(client);
 }
 
@@ -572,7 +570,6 @@ SProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client)
 {
     REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
     REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
-    swaps(&stuff->length);
     swapl(&stuff->screen);
     return ProcXF86DRIQueryDirectRenderingCapable(client);
 }
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 586caeab2..b1d604a9e 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -75,7 +75,6 @@ validDrawable(ClientPtr client, XID drawable, Mask access_mode,
 static int
 ProcDRI2QueryVersion(ClientPtr client)
 {
-    REQUEST(xDRI2QueryVersionReq);
     xDRI2QueryVersionReply rep = {
         .type = X_Reply,
         .sequenceNumber = client->sequence,
@@ -84,9 +83,6 @@ ProcDRI2QueryVersion(ClientPtr client)
         .minorVersion = dri2_minor
     };
 
-    if (client->swapped)
-        swaps(&stuff->length);
-
     REQUEST_SIZE_MATCH(xDRI2QueryVersionReq);
 
     if (client->swapped) {
@@ -651,7 +647,6 @@ SProcDRI2Connect(ClientPtr client)
 
     /* If the client is swapped, it's not local.  Talk to the hand. */
 
-    swaps(&stuff->length);
     if (sizeof(*stuff) / 4 != client->req_len)
         return BadLength;
 
commit 4d053f22f38b8f2c37d790f19381a75d5adefbd9
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 17:02:20 2024 +0200

    Xi: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xi/allowev.c b/Xi/allowev.c
index 0db7925a3..74e4ae214 100644
--- a/Xi/allowev.c
+++ b/Xi/allowev.c
@@ -72,7 +72,6 @@ int _X_COLD
 SProcXAllowDeviceEvents(ClientPtr client)
 {
     REQUEST(xAllowDeviceEventsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
     swapl(&stuff->time);
     return (ProcXAllowDeviceEvents(client));
diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 71fab9d8c..7fdb5d5e0 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -76,7 +76,6 @@ SProcXChangeDeviceControl(ClientPtr client)
     xDeviceCtl *ctl;
 
     REQUEST(xChangeDeviceControlReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
     swaps(&stuff->control);
     ctl = (xDeviceCtl *) &stuff[1];
diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c
index c51e667fb..e1295b5fa 100644
--- a/Xi/chgfctl.c
+++ b/Xi/chgfctl.c
@@ -73,7 +73,6 @@ int _X_COLD
 SProcXChangeFeedbackControl(ClientPtr client)
 {
     REQUEST(xChangeFeedbackControlReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
     swapl(&stuff->mask);
     return (ProcXChangeFeedbackControl(client));
diff --git a/Xi/chgkbd.c b/Xi/chgkbd.c
index 098c41fa9..a196b5046 100644
--- a/Xi/chgkbd.c
+++ b/Xi/chgkbd.c
@@ -73,9 +73,6 @@ SOFTWARE.
 int _X_COLD
 SProcXChangeKeyboardDevice(ClientPtr client)
 {
-    REQUEST(xChangeKeyboardDeviceReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
     return (ProcXChangeKeyboardDevice(client));
 }
 
diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c
index 936efc6c7..73cc8b4e2 100644
--- a/Xi/chgkmap.c
+++ b/Xi/chgkmap.c
@@ -75,7 +75,6 @@ SProcXChangeDeviceKeyMapping(ClientPtr client)
     unsigned int count;
 
     REQUEST(xChangeDeviceKeyMappingReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
     count = stuff->keyCodes * stuff->keySymsPerKeyCode;
     REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));
diff --git a/Xi/chgprop.c b/Xi/chgprop.c
index f369c4d84..ab1a6b601 100644
--- a/Xi/chgprop.c
+++ b/Xi/chgprop.c
@@ -75,7 +75,6 @@ int _X_COLD
 SProcXChangeDeviceDontPropagateList(ClientPtr client)
 {
     REQUEST(xChangeDeviceDontPropagateListReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
     swapl(&stuff->window);
     swaps(&stuff->count);
diff --git a/Xi/chgptr.c b/Xi/chgptr.c
index e90939092..b6e4777b9 100644
--- a/Xi/chgptr.c
+++ b/Xi/chgptr.c
@@ -75,9 +75,6 @@ SOFTWARE.
 int _X_COLD
 SProcXChangePointerDevice(ClientPtr client)
 {
-    REQUEST(xChangePointerDeviceReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
     return (ProcXChangePointerDevice(client));
 }
 
diff --git a/Xi/closedev.c b/Xi/closedev.c
index c0fb424ab..d7743f105 100644
--- a/Xi/closedev.c
+++ b/Xi/closedev.c
@@ -71,9 +71,6 @@ SOFTWARE.
 int _X_COLD
 SProcXCloseDevice(ClientPtr client)
 {
-    REQUEST(xCloseDeviceReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xCloseDeviceReq);
     return (ProcXCloseDevice(client));
 }
 
diff --git a/Xi/devbell.c b/Xi/devbell.c
index 51facd9b6..598780e65 100644
--- a/Xi/devbell.c
+++ b/Xi/devbell.c
@@ -69,8 +69,6 @@ SOFTWARE.
 int _X_COLD
 SProcXDeviceBell(ClientPtr client)
 {
-    REQUEST(xDeviceBellReq);
-    swaps(&stuff->length);
     return (ProcXDeviceBell(client));
 }
 
diff --git a/Xi/getbmap.c b/Xi/getbmap.c
index 01ade01c4..8344ddbc1 100644
--- a/Xi/getbmap.c
+++ b/Xi/getbmap.c
@@ -68,8 +68,6 @@ SOFTWARE.
 int _X_COLD
 SProcXGetDeviceButtonMapping(ClientPtr client)
 {
-    REQUEST(xGetDeviceButtonMappingReq);
-    swaps(&stuff->length);
     return (ProcXGetDeviceButtonMapping(client));
 }
 
diff --git a/Xi/getdctl.c b/Xi/getdctl.c
index 98fea52de..07b6bec7e 100644
--- a/Xi/getdctl.c
+++ b/Xi/getdctl.c
@@ -70,7 +70,6 @@ int _X_COLD
 SProcXGetDeviceControl(ClientPtr client)
 {
     REQUEST(xGetDeviceControlReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGetDeviceControlReq);
     swaps(&stuff->control);
     return (ProcXGetDeviceControl(client));
diff --git a/Xi/getfctl.c b/Xi/getfctl.c
index 88e816975..b920de468 100644
--- a/Xi/getfctl.c
+++ b/Xi/getfctl.c
@@ -69,8 +69,6 @@ SOFTWARE.
 int _X_COLD
 SProcXGetFeedbackControl(ClientPtr client)
 {
-    REQUEST(xGetFeedbackControlReq);
-    swaps(&stuff->length);
     return (ProcXGetFeedbackControl(client));
 }
 
diff --git a/Xi/getfocus.c b/Xi/getfocus.c
index de280ea79..41dda55b6 100644
--- a/Xi/getfocus.c
+++ b/Xi/getfocus.c
@@ -69,8 +69,6 @@ SOFTWARE.
 int _X_COLD
 SProcXGetDeviceFocus(ClientPtr client)
 {
-    REQUEST(xGetDeviceFocusReq);
-    swaps(&stuff->length);
     return (ProcXGetDeviceFocus(client));
 }
 
diff --git a/Xi/getkmap.c b/Xi/getkmap.c
index 1352ae6c7..6288e764a 100644
--- a/Xi/getkmap.c
+++ b/Xi/getkmap.c
@@ -72,8 +72,6 @@ SOFTWARE.
 int _X_COLD
 SProcXGetDeviceKeyMapping(ClientPtr client)
 {
-    REQUEST(xGetDeviceKeyMappingReq);
-    swaps(&stuff->length);
     return (ProcXGetDeviceKeyMapping(client));
 }
 
diff --git a/Xi/getmmap.c b/Xi/getmmap.c
index 31f723cdf..c7242d361 100644
--- a/Xi/getmmap.c
+++ b/Xi/getmmap.c
@@ -69,8 +69,6 @@ SOFTWARE.
 int _X_COLD
 SProcXGetDeviceModifierMapping(ClientPtr client)
 {
-    REQUEST(xGetDeviceModifierMappingReq);
-    swaps(&stuff->length);
     return (ProcXGetDeviceModifierMapping(client));
 }
 
diff --git a/Xi/getprop.c b/Xi/getprop.c
index 205b4ec5c..54b8131ec 100644
--- a/Xi/getprop.c
+++ b/Xi/getprop.c
@@ -76,7 +76,6 @@ int _X_COLD
 SProcXGetDeviceDontPropagateList(ClientPtr client)
 {
     REQUEST(xGetDeviceDontPropagateListReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
     swapl(&stuff->window);
     return (ProcXGetDeviceDontPropagateList(client));
diff --git a/Xi/getselev.c b/Xi/getselev.c
index 2e1eb906a..0abf9faa9 100644
--- a/Xi/getselev.c
+++ b/Xi/getselev.c
@@ -74,7 +74,6 @@ int _X_COLD
 SProcXGetSelectedExtensionEvents(ClientPtr client)
 {
     REQUEST(xGetSelectedExtensionEventsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
     swapl(&stuff->window);
     return (ProcXGetSelectedExtensionEvents(client));
diff --git a/Xi/getvers.c b/Xi/getvers.c
index 6bcca1056..0d90fc9a8 100644
--- a/Xi/getvers.c
+++ b/Xi/getvers.c
@@ -72,7 +72,6 @@ int _X_COLD
 SProcXGetExtensionVersion(ClientPtr client)
 {
     REQUEST(xGetExtensionVersionReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
     swaps(&stuff->nbytes);
     return (ProcXGetExtensionVersion(client));
diff --git a/Xi/grabdev.c b/Xi/grabdev.c
index 146d313de..ba18a716a 100644
--- a/Xi/grabdev.c
+++ b/Xi/grabdev.c
@@ -76,7 +76,6 @@ int _X_COLD
 SProcXGrabDevice(ClientPtr client)
 {
     REQUEST(xGrabDeviceReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
     swapl(&stuff->grabWindow);
     swapl(&stuff->time);
diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c
index ffd55627d..9a2ef87ab 100644
--- a/Xi/grabdevb.c
+++ b/Xi/grabdevb.c
@@ -74,7 +74,6 @@ int _X_COLD
 SProcXGrabDeviceButton(ClientPtr client)
 {
     REQUEST(xGrabDeviceButtonReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->modifiers);
diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c
index 4e278b747..7668735ea 100644
--- a/Xi/grabdevk.c
+++ b/Xi/grabdevk.c
@@ -74,7 +74,6 @@ int _X_COLD
 SProcXGrabDeviceKey(ClientPtr client)
 {
     REQUEST(xGrabDeviceKeyReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->modifiers);
diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c
index 557dd888c..41d68ec87 100644
--- a/Xi/gtmotion.c
+++ b/Xi/gtmotion.c
@@ -71,7 +71,6 @@ int _X_COLD
 SProcXGetDeviceMotionEvents(ClientPtr client)
 {
     REQUEST(xGetDeviceMotionEventsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
     swapl(&stuff->start);
     swapl(&stuff->stop);
diff --git a/Xi/listdev.c b/Xi/listdev.c
index 37961b6c1..a1d4a90e5 100644
--- a/Xi/listdev.c
+++ b/Xi/listdev.c
@@ -77,8 +77,6 @@ SOFTWARE.
 int _X_COLD
 SProcXListInputDevices(ClientPtr client)
 {
-    REQUEST(xListInputDevicesReq);
-    swaps(&stuff->length);
     return (ProcXListInputDevices(client));
 }
 
diff --git a/Xi/opendev.c b/Xi/opendev.c
index 8d2e117e8..9d4e579fc 100644
--- a/Xi/opendev.c
+++ b/Xi/opendev.c
@@ -74,8 +74,6 @@ extern CARD8 event_base[];
 int _X_COLD
 SProcXOpenDevice(ClientPtr client)
 {
-    REQUEST(xOpenDeviceReq);
-    swaps(&stuff->length);
     return (ProcXOpenDevice(client));
 }
 
diff --git a/Xi/queryst.c b/Xi/queryst.c
index 3bfba94ae..6c665e698 100644
--- a/Xi/queryst.c
+++ b/Xi/queryst.c
@@ -56,8 +56,6 @@ from The Open Group.
 int _X_COLD
 SProcXQueryDeviceState(ClientPtr client)
 {
-    REQUEST(xQueryDeviceStateReq);
-    swaps(&stuff->length);
     return (ProcXQueryDeviceState(client));
 }
 
diff --git a/Xi/selectev.c b/Xi/selectev.c
index a8c7f0c45..3f2a3178c 100644
--- a/Xi/selectev.c
+++ b/Xi/selectev.c
@@ -121,7 +121,6 @@ int _X_COLD
 SProcXSelectExtensionEvent(ClientPtr client)
 {
     REQUEST(xSelectExtensionEventReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
     swapl(&stuff->window);
     swaps(&stuff->count);
diff --git a/Xi/sendexev.c b/Xi/sendexev.c
index d116909bb..79a93b6b7 100644
--- a/Xi/sendexev.c
+++ b/Xi/sendexev.c
@@ -82,7 +82,6 @@ SProcXSendExtensionEvent(ClientPtr client)
     EventSwapPtr proc;
 
     REQUEST(xSendExtensionEventReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
     swapl(&stuff->destination);
     swaps(&stuff->count);
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index b05ae07a1..7af6e6f08 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -71,8 +71,6 @@ SOFTWARE.
 int _X_COLD
 SProcXSetDeviceButtonMapping(ClientPtr client)
 {
-    REQUEST(xSetDeviceButtonMappingReq);
-    swaps(&stuff->length);
     return (ProcXSetDeviceButtonMapping(client));
 }
 
diff --git a/Xi/setdval.c b/Xi/setdval.c
index 26fed9094..3f8b3675e 100644
--- a/Xi/setdval.c
+++ b/Xi/setdval.c
@@ -71,8 +71,6 @@ SOFTWARE.
 int _X_COLD
 SProcXSetDeviceValuators(ClientPtr client)
 {
-    REQUEST(xSetDeviceValuatorsReq);
-    swaps(&stuff->length);
     return (ProcXSetDeviceValuators(client));
 }
 
diff --git a/Xi/setfocus.c b/Xi/setfocus.c
index de3870201..16f969436 100644
--- a/Xi/setfocus.c
+++ b/Xi/setfocus.c
@@ -74,7 +74,6 @@ int _X_COLD
 SProcXSetDeviceFocus(ClientPtr client)
 {
     REQUEST(xSetDeviceFocusReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
     swapl(&stuff->focus);
     swapl(&stuff->time);
diff --git a/Xi/setmmap.c b/Xi/setmmap.c
index 5e6c0831f..4c1ce2c5e 100644
--- a/Xi/setmmap.c
+++ b/Xi/setmmap.c
@@ -73,8 +73,6 @@ SOFTWARE.
 int _X_COLD
 SProcXSetDeviceModifierMapping(ClientPtr client)
 {
-    REQUEST(xSetDeviceModifierMappingReq);
-    swaps(&stuff->length);
     return (ProcXSetDeviceModifierMapping(client));
 }
 
diff --git a/Xi/setmode.c b/Xi/setmode.c
index e218eefb4..bae3838b0 100644
--- a/Xi/setmode.c
+++ b/Xi/setmode.c
@@ -71,8 +71,6 @@ SOFTWARE.
 int _X_COLD
 SProcXSetDeviceMode(ClientPtr client)
 {
-    REQUEST(xSetDeviceModeReq);
-    swaps(&stuff->length);
     return (ProcXSetDeviceMode(client));
 }
 
diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c
index 44afc47b1..e64d3b99c 100644
--- a/Xi/ungrdev.c
+++ b/Xi/ungrdev.c
@@ -69,7 +69,6 @@ int _X_COLD
 SProcXUngrabDevice(ClientPtr client)
 {
     REQUEST(xUngrabDeviceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xUngrabDeviceReq);
     swapl(&stuff->time);
     return (ProcXUngrabDevice(client));
diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c
index 06c03ddef..1d6795fe8 100644
--- a/Xi/ungrdevb.c
+++ b/Xi/ungrdevb.c
@@ -77,7 +77,6 @@ int _X_COLD
 SProcXUngrabDeviceButton(ClientPtr client)
 {
     REQUEST(xUngrabDeviceButtonReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->modifiers);
diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c
index e148e423a..eee36cbd1 100644
--- a/Xi/ungrdevk.c
+++ b/Xi/ungrdevk.c
@@ -79,7 +79,6 @@ int _X_COLD
 SProcXUngrabDeviceKey(ClientPtr client)
 {
     REQUEST(xUngrabDeviceKeyReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
     swapl(&stuff->grabWindow);
     swaps(&stuff->modifiers);
diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index 7c0231417..ab027216e 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -51,7 +51,6 @@ SProcXIAllowEvents(ClientPtr client)
     REQUEST(xXIAllowEventsReq);
     REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->time);
     if (client->req_len > 3) {
diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index bd664ae8a..80c4b5981 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -842,7 +842,6 @@ SProcXIBarrierReleasePointer(ClientPtr client)
     REQUEST(xXIBarrierReleasePointerReq);
     int i;
 
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
 
     swapl(&stuff->num_barriers);
diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c
index 066fe290b..a0ed7adf7 100644
--- a/Xi/xichangecursor.c
+++ b/Xi/xichangecursor.c
@@ -59,7 +59,6 @@ SProcXIChangeCursor(ClientPtr client)
 {
     REQUEST(xXIChangeCursorReq);
     REQUEST_SIZE_MATCH(xXIChangeCursorReq);
-    swaps(&stuff->length);
     swapl(&stuff->win);
     swapl(&stuff->cursor);
     swaps(&stuff->deviceid);
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index cd4c1f5f0..709c8f12a 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -131,8 +131,6 @@ XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
 int _X_COLD
 SProcXIChangeHierarchy(ClientPtr client)
 {
-    REQUEST(xXIChangeHierarchyReq);
-    swaps(&stuff->length);
     return (ProcXIChangeHierarchy(client));
 }
 
diff --git a/Xi/xigetclientpointer.c b/Xi/xigetclientpointer.c
index 597cf38b8..95fb6f2d1 100644
--- a/Xi/xigetclientpointer.c
+++ b/Xi/xigetclientpointer.c
@@ -52,7 +52,6 @@ SProcXIGetClientPointer(ClientPtr client)
     REQUEST(xXIGetClientPointerReq);
     REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->win);
     return ProcXIGetClientPointer(client);
 }
diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c
index ca4f66ee4..0ea42db88 100644
--- a/Xi/xigrabdev.c
+++ b/Xi/xigrabdev.c
@@ -53,7 +53,6 @@ SProcXIGrabDevice(ClientPtr client)
      */
     REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->grab_window);
     swapl(&stuff->cursor);
@@ -138,7 +137,6 @@ SProcXIUngrabDevice(ClientPtr client)
     REQUEST(xXIUngrabDeviceReq);
     REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->time);
 
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index afb24928a..2d6c51eb5 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -55,7 +55,6 @@ SProcXIPassiveGrabDevice(ClientPtr client)
     REQUEST(xXIPassiveGrabDeviceReq);
     REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->grab_window);
     swapl(&stuff->cursor);
@@ -280,7 +279,6 @@ SProcXIPassiveUngrabDevice(ClientPtr client)
     REQUEST(xXIPassiveUngrabDeviceReq);
     REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->grab_window);
     swaps(&stuff->deviceid);
     swapl(&stuff->detail);
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 0a2376776..903f82a5e 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -1016,10 +1016,6 @@ ProcXGetDeviceProperty(ClientPtr client)
 int _X_COLD
 SProcXListDeviceProperties(ClientPtr client)
 {
-    REQUEST(xListDevicePropertiesReq);
-    REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
-
-    swaps(&stuff->length);
     return (ProcXListDeviceProperties(client));
 }
 
@@ -1029,7 +1025,6 @@ SProcXChangeDeviceProperty(ClientPtr client)
     REQUEST(xChangeDevicePropertyReq);
 
     REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->property);
     swapl(&stuff->type);
     swapl(&stuff->nUnits);
@@ -1042,7 +1037,6 @@ SProcXDeleteDeviceProperty(ClientPtr client)
     REQUEST(xDeleteDevicePropertyReq);
     REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->property);
     return (ProcXDeleteDeviceProperty(client));
 }
@@ -1053,7 +1047,6 @@ SProcXGetDeviceProperty(ClientPtr client)
     REQUEST(xGetDevicePropertyReq);
     REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->property);
     swapl(&stuff->type);
     swapl(&stuff->longOffset);
@@ -1261,7 +1254,6 @@ SProcXIListProperties(ClientPtr client)
     REQUEST(xXIListPropertiesReq);
     REQUEST_SIZE_MATCH(xXIListPropertiesReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     return (ProcXIListProperties(client));
 }
@@ -1272,7 +1264,6 @@ SProcXIChangeProperty(ClientPtr client)
     REQUEST(xXIChangePropertyReq);
 
     REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->property);
     swapl(&stuff->type);
@@ -1286,7 +1277,6 @@ SProcXIDeleteProperty(ClientPtr client)
     REQUEST(xXIDeletePropertyReq);
     REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->property);
     return (ProcXIDeleteProperty(client));
@@ -1298,7 +1288,6 @@ SProcXIGetProperty(ClientPtr client)
     REQUEST(xXIGetPropertyReq);
     REQUEST_SIZE_MATCH(xXIGetPropertyReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->property);
     swapl(&stuff->type);
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index cbc3c037e..af72e05f7 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -58,7 +58,6 @@ SProcXIQueryDevice(ClientPtr client)
     REQUEST(xXIQueryDeviceReq);
     REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
 
     return ProcXIQueryDevice(client);
diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c
index 5ca18484b..6c9d200ed 100644
--- a/Xi/xiquerypointer.c
+++ b/Xi/xiquerypointer.c
@@ -67,7 +67,6 @@ SProcXIQueryPointer(ClientPtr client)
     REQUEST(xXIQueryPointerReq);
     REQUEST_SIZE_MATCH(xXIQueryPointerReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->win);
     return (ProcXIQueryPointer(client));
diff --git a/Xi/xiqueryversion.c b/Xi/xiqueryversion.c
index 8672409f7..e6c69dd51 100644
--- a/Xi/xiqueryversion.c
+++ b/Xi/xiqueryversion.c
@@ -133,7 +133,6 @@ int _X_COLD
 SProcXIQueryVersion(ClientPtr client)
 {
     REQUEST(xXIQueryVersionReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq);
     swaps(&stuff->major_version);
     swaps(&stuff->minor_version);
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index 701a0f3b8..d341a12d5 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -120,7 +120,6 @@ SProcXISelectEvents(ClientPtr client)
     xXIEventMask *evmask;
 
     REQUEST(xXISelectEventsReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
     swapl(&stuff->win);
     swaps(&stuff->num_masks);
@@ -331,7 +330,6 @@ int _X_COLD
 SProcXIGetSelectedEvents(ClientPtr client)
 {
     REQUEST(xXIGetSelectedEventsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
     swapl(&stuff->win);
 
diff --git a/Xi/xisetclientpointer.c b/Xi/xisetclientpointer.c
index 85ce3d75e..b6c3ddfd8 100644
--- a/Xi/xisetclientpointer.c
+++ b/Xi/xisetclientpointer.c
@@ -53,7 +53,6 @@ SProcXISetClientPointer(ClientPtr client)
     REQUEST(xXISetClientPointerReq);
     REQUEST_SIZE_MATCH(xXISetClientPointerReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->win);
     swaps(&stuff->deviceid);
     return (ProcXISetClientPointer(client));
diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c
index 421511ee5..bf2103fdc 100644
--- a/Xi/xisetdevfocus.c
+++ b/Xi/xisetdevfocus.c
@@ -46,7 +46,6 @@ SProcXISetFocus(ClientPtr client)
     REQUEST(xXISetFocusReq);
     REQUEST_AT_LEAST_SIZE(xXISetFocusReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->focus);
     swapl(&stuff->time);
@@ -60,7 +59,6 @@ SProcXIGetFocus(ClientPtr client)
     REQUEST(xXIGetFocusReq);
     REQUEST_AT_LEAST_SIZE(xXIGetFocusReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->deviceid);
 
     return ProcXIGetFocus(client);
diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c
index 5f32b18de..f4e08abdf 100644
--- a/Xi/xiwarppointer.c
+++ b/Xi/xiwarppointer.c
@@ -61,7 +61,6 @@ SProcXIWarpPointer(ClientPtr client)
     REQUEST(xXIWarpPointerReq);
     REQUEST_SIZE_MATCH(xXIWarpPointerReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->src_win);
     swapl(&stuff->dst_win);
     swapl(&stuff->src_x);
diff --git a/test/xi2/protocol-xigetselectedevents.c b/test/xi2/protocol-xigetselectedevents.c
index 33cd899f4..b13077955 100644
--- a/test/xi2/protocol-xigetselectedevents.c
+++ b/test/xi2/protocol-xigetselectedevents.c
@@ -139,8 +139,18 @@ request_XIGetSelectedEvents(xXIGetSelectedEventsReq * req, int error)
 
     wrapped_WriteToClient = reply_XIGetSelectedEvents;
     client.swapped = TRUE;
+
+    /* MUST NOT swap req->length here !
+
+       The handler proc's don't use that field anymore, thus also SProc's
+       wont swap it. But this test program uses that field to initialize
+       client->req_len (see above). We previously had to swap it here, so
+       that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
+       now, still swapping itself would break if this function is called
+       again and writing back a errornously swapped value
+    */
+
     swapl(&req->win);
-    swaps(&req->length);
     rc = SProcXIGetSelectedEvents(&client);
     assert(rc == error);
 }
diff --git a/test/xi2/protocol-xipassivegrabdevice.c b/test/xi2/protocol-xipassivegrabdevice.c
index 2146462b0..18413a853 100644
--- a/test/xi2/protocol-xipassivegrabdevice.c
+++ b/test/xi2/protocol-xipassivegrabdevice.c
@@ -144,7 +144,17 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req,
         assert(client_request.errorValue == errval);
 
     client_request.swapped = TRUE;
-    swaps(&req->length);
+
+    /* MUST NOT swap req->length here !
+
+       The handler proc's don't use that field anymore, thus also SProc's
+       wont swap it. But this test program uses that field to initialize
+       client->req_len (see above). We previously had to swap it here, so
+       that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
+       now, still swapping itself would break if this function is called
+       again and writing back a errornously swapped value
+    */
+
     swapl(&req->time);
     swapl(&req->grab_window);
     swapl(&req->cursor);
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
index 612cb6bdb..237c8f00b 100644
--- a/test/xi2/protocol-xiselectevents.c
+++ b/test/xi2/protocol-xiselectevents.c
@@ -107,8 +107,17 @@ request_XISelectEvent(xXISelectEventsReq * req, int error)
         mask = next;
     }
 
+    /* MUST NOT swap req->length here !
+
+       The handler proc's don't use that field anymore, thus also SProc's
+       wont swap it. But this test program uses that field to initialize
+       client->req_len (see above). We previously had to swap it here, so
+       that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
+       now, still swapping itself would break if this function is called
+       again and writing back a errornously swapped value
+    */
+
     swapl(&req->win);
-    swaps(&req->length);
     swaps(&req->num_masks);
     rc = SProcXISelectEvents(&client);
     assert(rc == error);
diff --git a/test/xi2/protocol-xisetclientpointer.c b/test/xi2/protocol-xisetclientpointer.c
index d47baea7d..674bc9b18 100644
--- a/test/xi2/protocol-xisetclientpointer.c
+++ b/test/xi2/protocol-xisetclientpointer.c
@@ -66,8 +66,18 @@ request_XISetClientPointer(xXISetClientPointerReq * req, int error)
         assert(client_request.errorValue == req->deviceid);
 
     client_request.swapped = TRUE;
+
+    /* MUST NOT swap req->length here !
+
+       The handler proc's don't use that field anymore, thus also SProc's
+       wont swap it. But this test program uses that field to initialize
+       client->req_len (see above). We previously had to swap it here, so
+       that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
+       now, still swapping itself would break if this function is called
+       again and writing back a errornously swapped value
+    */
+
     swapl(&req->win);
-    swaps(&req->length);
     swaps(&req->deviceid);
     rc = SProcXISetClientPointer(&client_request);
     assert(rc == error);
commit 54d4dd619c1ddc4be0d1fa902bf6be6f9b4ab30f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:21:12 2024 +0200

    Xext: xv: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index d82130f4c..da51fb432 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1118,9 +1118,6 @@ ProcXvDispatch(ClientPtr client)
 static int _X_COLD
 SProcXvQueryExtension(ClientPtr client)
 {
-    REQUEST(xvQueryExtensionReq);
-    REQUEST_SIZE_MATCH(xvQueryExtensionReq);
-    swaps(&stuff->length);
     return XvProcVector[xv_QueryExtension] (client);
 }
 
@@ -1129,7 +1126,6 @@ SProcXvQueryAdaptors(ClientPtr client)
 {
     REQUEST(xvQueryAdaptorsReq);
     REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return XvProcVector[xv_QueryAdaptors] (client);
 }
@@ -1139,7 +1135,6 @@ SProcXvQueryEncodings(ClientPtr client)
 {
     REQUEST(xvQueryEncodingsReq);
     REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     return XvProcVector[xv_QueryEncodings] (client);
 }
@@ -1149,7 +1144,6 @@ SProcXvGrabPort(ClientPtr client)
 {
     REQUEST(xvGrabPortReq);
     REQUEST_SIZE_MATCH(xvGrabPortReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->time);
     return XvProcVector[xv_GrabPort] (client);
@@ -1160,7 +1154,6 @@ SProcXvUngrabPort(ClientPtr client)
 {
     REQUEST(xvUngrabPortReq);
     REQUEST_SIZE_MATCH(xvUngrabPortReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->time);
     return XvProcVector[xv_UngrabPort] (client);
@@ -1171,7 +1164,6 @@ SProcXvPutVideo(ClientPtr client)
 {
     REQUEST(xvPutVideoReq);
     REQUEST_SIZE_MATCH(xvPutVideoReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -1191,7 +1183,6 @@ SProcXvPutStill(ClientPtr client)
 {
     REQUEST(xvPutStillReq);
     REQUEST_SIZE_MATCH(xvPutStillReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -1211,7 +1202,6 @@ SProcXvGetVideo(ClientPtr client)
 {
     REQUEST(xvGetVideoReq);
     REQUEST_SIZE_MATCH(xvGetVideoReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -1231,7 +1221,6 @@ SProcXvGetStill(ClientPtr client)
 {
     REQUEST(xvGetStillReq);
     REQUEST_SIZE_MATCH(xvGetStillReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -1251,7 +1240,6 @@ SProcXvPutImage(ClientPtr client)
 {
     REQUEST(xvPutImageReq);
     REQUEST_AT_LEAST_SIZE(xvPutImageReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -1275,7 +1263,6 @@ SProcXvShmPutImage(ClientPtr client)
 {
     REQUEST(xvShmPutImageReq);
     REQUEST_SIZE_MATCH(xvShmPutImageReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -1303,7 +1290,6 @@ SProcXvSelectVideoNotify(ClientPtr client)
 {
     REQUEST(xvSelectVideoNotifyReq);
     REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
-    swaps(&stuff->length);
     swapl(&stuff->drawable);
     return XvProcVector[xv_SelectVideoNotify] (client);
 }
@@ -1313,7 +1299,6 @@ SProcXvSelectPortNotify(ClientPtr client)
 {
     REQUEST(xvSelectPortNotifyReq);
     REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     return XvProcVector[xv_SelectPortNotify] (client);
 }
@@ -1323,7 +1308,6 @@ SProcXvStopVideo(ClientPtr client)
 {
     REQUEST(xvStopVideoReq);
     REQUEST_SIZE_MATCH(xvStopVideoReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->drawable);
     return XvProcVector[xv_StopVideo] (client);
@@ -1334,7 +1318,6 @@ SProcXvSetPortAttribute(ClientPtr client)
 {
     REQUEST(xvSetPortAttributeReq);
     REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->attribute);
     swapl(&stuff->value);
@@ -1346,7 +1329,6 @@ SProcXvGetPortAttribute(ClientPtr client)
 {
     REQUEST(xvGetPortAttributeReq);
     REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->attribute);
     return XvProcVector[xv_GetPortAttribute] (client);
@@ -1357,7 +1339,6 @@ SProcXvQueryBestSize(ClientPtr client)
 {
     REQUEST(xvQueryBestSizeReq);
     REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swaps(&stuff->vid_w);
     swaps(&stuff->vid_h);
@@ -1371,7 +1352,6 @@ SProcXvQueryPortAttributes(ClientPtr client)
 {
     REQUEST(xvQueryPortAttributesReq);
     REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     return XvProcVector[xv_QueryPortAttributes] (client);
 }
@@ -1381,7 +1361,6 @@ SProcXvQueryImageAttributes(ClientPtr client)
 {
     REQUEST(xvQueryImageAttributesReq);
     REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     swapl(&stuff->id);
     swaps(&stuff->width);
@@ -1394,7 +1373,6 @@ SProcXvListImageFormats(ClientPtr client)
 {
     REQUEST(xvListImageFormatsReq);
     REQUEST_SIZE_MATCH(xvListImageFormatsReq);
-    swaps(&stuff->length);
     swapl(&stuff->port);
     return XvProcVector[xv_ListImageFormats] (client);
 }
commit 69982abf7b4da1c6f9c080248b6c8617ffbf32db
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:20:47 2024 +0200

    Xext: xtest: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xtest.c b/Xext/xtest.c
index b8bdd8208..634b2ca48 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -373,7 +373,6 @@ ProcXTestFakeInput(ClientPtr client)
         /* swap the request back so we can simply re-execute it */
         if (client->swapped) {
             (void) XTestSwapFakeInput(client, (xReq *) stuff);
-            swaps(&stuff->length);
         }
         ResetCurrentRequest(client);
         client->sequence--;
@@ -487,8 +486,6 @@ static int _X_COLD
 SProcXTestGetVersion(ClientPtr client)
 {
     REQUEST(xXTestGetVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXTestGetVersionReq);
     swaps(&stuff->minorVersion);
     return ProcXTestGetVersion(client);
@@ -498,8 +495,6 @@ static int _X_COLD
 SProcXTestCompareCursor(ClientPtr client)
 {
     REQUEST(xXTestCompareCursorReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
     swapl(&stuff->window);
     swapl(&stuff->cursor);
@@ -537,7 +532,6 @@ SProcXTestFakeInput(ClientPtr client)
 
     REQUEST(xReq);
 
-    swaps(&stuff->length);
     n = XTestSwapFakeInput(client, stuff);
     if (n != Success)
         return n;
@@ -547,10 +541,6 @@ SProcXTestFakeInput(ClientPtr client)
 static int _X_COLD
 SProcXTestGrabControl(ClientPtr client)
 {
-    REQUEST(xXTestGrabControlReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xXTestGrabControlReq);
     return ProcXTestGrabControl(client);
 }
 
commit 8a5d2a1335af18fe5254274692a8e1ba19c2760f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:20:25 2024 +0200

    Xext: selinux: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 506eb5d0f..407c43570 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -625,8 +625,6 @@ SProcSELinuxDispatch(ClientPtr client)
 {
     REQUEST(xReq);
 
-    swaps(&stuff->length);
-
     switch (stuff->data) {
     case X_SELinuxQueryVersion:
         return SProcSELinuxQueryVersion(client);
commit 8b57516414d56c7c9b9f2c390bbe86d3add12eef
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:20:03 2024 +0200

    Xext: xres: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xres.c b/Xext/xres.c
index dd776ba62..403ab74bb 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -1078,7 +1078,6 @@ static int _X_COLD
 SProcResDispatch (ClientPtr client)
 {
     REQUEST(xReq);
-    swaps(&stuff->length);
 
     switch (stuff->data) {
     case X_XResQueryVersion:
commit 776efd3cfc8be4b9a060cd4ec2037e6275ad22fc
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:19:35 2024 +0200

    Xext: xf86bigfont: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 4058740d1..e7cc99fd9 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -652,8 +652,6 @@ static int _X_COLD
 SProcXF86BigfontQueryVersion(ClientPtr client)
 {
     REQUEST(xXF86BigfontQueryVersionReq);
-
-    swaps(&stuff->length);
     return ProcXF86BigfontQueryVersion(client);
 }
 
@@ -661,8 +659,6 @@ static int _X_COLD
 SProcXF86BigfontQueryFont(ClientPtr client)
 {
     REQUEST(xXF86BigfontQueryFontReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq);
     swapl(&stuff->id);
     return ProcXF86BigfontQueryFont(client);
commit 405a227c7395f5b8a93298b005d80eb8087a9780
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 14:02:07 2024 +0200

    Xext: xcmisc: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index b70e54ed4..1e4765d9a 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -144,8 +144,6 @@ static int _X_COLD
 SProcXCMiscGetVersion(ClientPtr client)
 {
     REQUEST(xXCMiscGetVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
     swaps(&stuff->majorVersion);
     swaps(&stuff->minorVersion);
@@ -155,9 +153,6 @@ SProcXCMiscGetVersion(ClientPtr client)
 static int _X_COLD
 SProcXCMiscGetXIDRange(ClientPtr client)
 {
-    REQUEST(xReq);
-
-    swaps(&stuff->length);
     return ProcXCMiscGetXIDRange(client);
 }
 
@@ -167,7 +162,6 @@ SProcXCMiscGetXIDList(ClientPtr client)
     REQUEST(xXCMiscGetXIDListReq);
     REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->count);
     return ProcXCMiscGetXIDList(client);
 }
commit 65cb5e5575bfed556c81a38ce59122fc3dadb766
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:58:38 2024 +0200

    Xext: vidmode: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/vidmode.c b/Xext/vidmode.c
index db138b646..7fb843d5a 100644
--- a/Xext/vidmode.c
+++ b/Xext/vidmode.c
@@ -1704,8 +1704,6 @@ ProcVidModeDispatch(ClientPtr client)
 static int _X_COLD
 SProcVidModeQueryVersion(ClientPtr client)
 {
-    REQUEST(xXF86VidModeQueryVersionReq);
-    swaps(&stuff->length);
     return ProcVidModeQueryVersion(client);
 }
 
@@ -1713,7 +1711,6 @@ static int _X_COLD
 SProcVidModeGetModeLine(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetModeLineReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
     swaps(&stuff->screen);
     return ProcVidModeGetModeLine(client);
@@ -1723,7 +1720,6 @@ static int _X_COLD
 SProcVidModeGetAllModeLines(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetAllModeLinesReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
     swaps(&stuff->screen);
     return ProcVidModeGetAllModeLines(client);
@@ -1739,7 +1735,6 @@ SProcVidModeAddModeLine(ClientPtr client)
     REQUEST(xXF86VidModeAddModeLineReq);
     ver = ClientMajorVersion(client);
     if (ver < 2) {
-        swaps(&oldstuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
         swapl(&oldstuff->screen);
         swaps(&oldstuff->hdisplay);
@@ -1755,7 +1750,6 @@ SProcVidModeAddModeLine(ClientPtr client)
         SwapRestL(oldstuff);
     }
     else {
-        swaps(&stuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq);
         swapl(&stuff->screen);
         swaps(&stuff->hdisplay);
@@ -1784,7 +1778,6 @@ SProcVidModeDeleteModeLine(ClientPtr client)
     REQUEST(xXF86VidModeDeleteModeLineReq);
     ver = ClientMajorVersion(client);
     if (ver < 2) {
-        swaps(&oldstuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
         swapl(&oldstuff->screen);
         swaps(&oldstuff->hdisplay);
@@ -1800,7 +1793,6 @@ SProcVidModeDeleteModeLine(ClientPtr client)
         SwapRestL(oldstuff);
     }
     else {
-        swaps(&stuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq);
         swapl(&stuff->screen);
         swaps(&stuff->hdisplay);
@@ -1829,7 +1821,6 @@ SProcVidModeModModeLine(ClientPtr client)
     REQUEST(xXF86VidModeModModeLineReq);
     ver = ClientMajorVersion(client);
     if (ver < 2) {
-        swaps(&oldstuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
         swapl(&oldstuff->screen);
         swaps(&oldstuff->hdisplay);
@@ -1845,7 +1836,6 @@ SProcVidModeModModeLine(ClientPtr client)
         SwapRestL(oldstuff);
     }
     else {
-        swaps(&stuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq);
         swapl(&stuff->screen);
         swaps(&stuff->hdisplay);
@@ -1874,7 +1864,6 @@ SProcVidModeValidateModeLine(ClientPtr client)
     REQUEST(xXF86VidModeValidateModeLineReq);
     ver = ClientMajorVersion(client);
     if (ver < 2) {
-        swaps(&oldstuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
         swapl(&oldstuff->screen);
         swaps(&oldstuff->hdisplay);
@@ -1890,7 +1879,6 @@ SProcVidModeValidateModeLine(ClientPtr client)
         SwapRestL(oldstuff);
     }
     else {
-        swaps(&stuff->length);
         REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq);
         swapl(&stuff->screen);
         swaps(&stuff->hdisplay);
@@ -1913,7 +1901,6 @@ static int _X_COLD
 SProcVidModeSwitchMode(ClientPtr client)
 {
     REQUEST(xXF86VidModeSwitchModeReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq);
     swaps(&stuff->screen);
     swaps(&stuff->zoom);
@@ -1924,7 +1911,6 @@ static int _X_COLD
 SProcVidModeSwitchToMode(ClientPtr client)
 {
     REQUEST(xXF86VidModeSwitchToModeReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq);
     swapl(&stuff->screen);
     return ProcVidModeSwitchToMode(client);
@@ -1934,7 +1920,6 @@ static int _X_COLD
 SProcVidModeLockModeSwitch(ClientPtr client)
 {
     REQUEST(xXF86VidModeLockModeSwitchReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq);
     swaps(&stuff->screen);
     swaps(&stuff->lock);
@@ -1945,7 +1930,6 @@ static int _X_COLD
 SProcVidModeGetMonitor(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetMonitorReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
     swaps(&stuff->screen);
     return ProcVidModeGetMonitor(client);
@@ -1955,7 +1939,6 @@ static int _X_COLD
 SProcVidModeGetViewPort(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetViewPortReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
     swaps(&stuff->screen);
     return ProcVidModeGetViewPort(client);
@@ -1965,7 +1948,6 @@ static int _X_COLD
 SProcVidModeSetViewPort(ClientPtr client)
 {
     REQUEST(xXF86VidModeSetViewPortReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq);
     swaps(&stuff->screen);
     swapl(&stuff->x);
@@ -1977,7 +1959,6 @@ static int _X_COLD
 SProcVidModeGetDotClocks(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetDotClocksReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
     swaps(&stuff->screen);
     return ProcVidModeGetDotClocks(client);
@@ -1987,7 +1968,6 @@ static int _X_COLD
 SProcVidModeSetClientVersion(ClientPtr client)
 {
     REQUEST(xXF86VidModeSetClientVersionReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
     swaps(&stuff->major);
     swaps(&stuff->minor);
@@ -1998,7 +1978,6 @@ static int _X_COLD
 SProcVidModeSetGamma(ClientPtr client)
 {
     REQUEST(xXF86VidModeSetGammaReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq);
     swaps(&stuff->screen);
     swapl(&stuff->red);
@@ -2011,7 +1990,6 @@ static int _X_COLD
 SProcVidModeGetGamma(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetGammaReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
     swaps(&stuff->screen);
     return ProcVidModeGetGamma(client);
@@ -2023,7 +2001,6 @@ SProcVidModeSetGammaRamp(ClientPtr client)
     int length;
 
     REQUEST(xXF86VidModeSetGammaRampReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
     swaps(&stuff->size);
     swaps(&stuff->screen);
@@ -2037,7 +2014,6 @@ static int _X_COLD
 SProcVidModeGetGammaRamp(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetGammaRampReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
     swaps(&stuff->size);
     swaps(&stuff->screen);
@@ -2048,7 +2024,6 @@ static int _X_COLD
 SProcVidModeGetGammaRampSize(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetGammaRampSizeReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
     swaps(&stuff->screen);
     return ProcVidModeGetGammaRampSize(client);
@@ -2058,7 +2033,6 @@ static int _X_COLD
 SProcVidModeGetPermissions(ClientPtr client)
 {
     REQUEST(xXF86VidModeGetPermissionsReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
     swaps(&stuff->screen);
     return ProcVidModeGetPermissions(client);
commit bf6d132df667392487c97d1d59221d5e2cee86a5
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:54:37 2024 +0200

    Xext: sync: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/sync.c b/Xext/sync.c
index e5bee1d5a..75f13ea59 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -2154,20 +2154,12 @@ ProcSyncDispatch(ClientPtr client)
 static int _X_COLD
 SProcSyncInitialize(ClientPtr client)
 {
-    REQUEST(xSyncInitializeReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xSyncInitializeReq);
-
     return ProcSyncInitialize(client);
 }
 
 static int _X_COLD
 SProcSyncListSystemCounters(ClientPtr client)
 {
-    REQUEST(xSyncListSystemCountersReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xSyncListSystemCountersReq);
-
     return ProcSyncListSystemCounters(client);
 }
 
@@ -2175,7 +2167,6 @@ static int _X_COLD
 SProcSyncCreateCounter(ClientPtr client)
 {
     REQUEST(xSyncCreateCounterReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncCreateCounterReq);
     swapl(&stuff->cid);
     swapl(&stuff->initial_value_lo);
@@ -2188,7 +2179,6 @@ static int _X_COLD
 SProcSyncSetCounter(ClientPtr client)
 {
     REQUEST(xSyncSetCounterReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncSetCounterReq);
     swapl(&stuff->cid);
     swapl(&stuff->value_lo);
@@ -2201,7 +2191,6 @@ static int _X_COLD
 SProcSyncChangeCounter(ClientPtr client)
 {
     REQUEST(xSyncChangeCounterReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncChangeCounterReq);
     swapl(&stuff->cid);
     swapl(&stuff->value_lo);
@@ -2214,7 +2203,6 @@ static int _X_COLD
 SProcSyncQueryCounter(ClientPtr client)
 {
     REQUEST(xSyncQueryCounterReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncQueryCounterReq);
     swapl(&stuff->counter);
 
@@ -2225,7 +2213,6 @@ static int _X_COLD
 SProcSyncDestroyCounter(ClientPtr client)
 {
     REQUEST(xSyncDestroyCounterReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncDestroyCounterReq);
     swapl(&stuff->counter);
 
@@ -2236,7 +2223,6 @@ static int _X_COLD
 SProcSyncAwait(ClientPtr client)
 {
     REQUEST(xSyncAwaitReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSyncAwaitReq);
     SwapRestL(stuff);
 
@@ -2247,7 +2233,6 @@ static int _X_COLD
 SProcSyncCreateAlarm(ClientPtr client)
 {
     REQUEST(xSyncCreateAlarmReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq);
     swapl(&stuff->id);
     swapl(&stuff->valueMask);
@@ -2260,7 +2245,6 @@ static int _X_COLD
 SProcSyncChangeAlarm(ClientPtr client)
 {
     REQUEST(xSyncChangeAlarmReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
     swapl(&stuff->alarm);
     swapl(&stuff->valueMask);
@@ -2272,7 +2256,6 @@ static int _X_COLD
 SProcSyncQueryAlarm(ClientPtr client)
 {
     REQUEST(xSyncQueryAlarmReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncQueryAlarmReq);
     swapl(&stuff->alarm);
 
@@ -2283,7 +2266,6 @@ static int _X_COLD
 SProcSyncDestroyAlarm(ClientPtr client)
 {
     REQUEST(xSyncDestroyAlarmReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq);
     swapl(&stuff->alarm);
 
@@ -2294,7 +2276,6 @@ static int _X_COLD
 SProcSyncSetPriority(ClientPtr client)
 {
     REQUEST(xSyncSetPriorityReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncSetPriorityReq);
     swapl(&stuff->id);
     swapl(&stuff->priority);
@@ -2306,7 +2287,6 @@ static int _X_COLD
 SProcSyncGetPriority(ClientPtr client)
 {
     REQUEST(xSyncGetPriorityReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncGetPriorityReq);
     swapl(&stuff->id);
 
@@ -2317,7 +2297,6 @@ static int _X_COLD
 SProcSyncCreateFence(ClientPtr client)
 {
     REQUEST(xSyncCreateFenceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncCreateFenceReq);
     swapl(&stuff->d);
     swapl(&stuff->fid);
@@ -2329,7 +2308,6 @@ static int _X_COLD
 SProcSyncTriggerFence(ClientPtr client)
 {
     REQUEST(xSyncTriggerFenceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncTriggerFenceReq);
     swapl(&stuff->fid);
 
@@ -2340,7 +2318,6 @@ static int _X_COLD
 SProcSyncResetFence(ClientPtr client)
 {
     REQUEST(xSyncResetFenceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncResetFenceReq);
     swapl(&stuff->fid);
 
@@ -2351,7 +2328,6 @@ static int _X_COLD
 SProcSyncDestroyFence(ClientPtr client)
 {
     REQUEST(xSyncDestroyFenceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncDestroyFenceReq);
     swapl(&stuff->fid);
 
@@ -2362,7 +2338,6 @@ static int _X_COLD
 SProcSyncQueryFence(ClientPtr client)
 {
     REQUEST(xSyncQueryFenceReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSyncQueryFenceReq);
     swapl(&stuff->fid);
 
@@ -2373,7 +2348,6 @@ static int _X_COLD
 SProcSyncAwaitFence(ClientPtr client)
 {
     REQUEST(xSyncAwaitFenceReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq);
     SwapRestL(stuff);
 
commit 75544f1f5889b20cf565a699785238180737d0b2
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:52:18 2024 +0200

    Xext: shm: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/shm.c b/Xext/shm.c
index bbdaeccca..6c0c68b5a 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1389,9 +1389,6 @@ SShmCompletionEvent(xShmCompletionEvent * from, xShmCompletionEvent * to)
 static int _X_COLD
 SProcShmQueryVersion(ClientPtr client)
 {
-    REQUEST(xShmQueryVersionReq);
-
-    swaps(&stuff->length);
     return ProcShmQueryVersion(client);
 }
 
@@ -1399,7 +1396,6 @@ static int _X_COLD
 SProcShmAttach(ClientPtr client)
 {
     REQUEST(xShmAttachReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShmAttachReq);
     swapl(&stuff->shmseg);
     swapl(&stuff->shmid);
@@ -1410,7 +1406,6 @@ static int _X_COLD
 SProcShmDetach(ClientPtr client)
 {
     REQUEST(xShmDetachReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShmDetachReq);
     swapl(&stuff->shmseg);
     return ProcShmDetach(client);
@@ -1420,7 +1415,6 @@ static int _X_COLD
 SProcShmPutImage(ClientPtr client)
 {
     REQUEST(xShmPutImageReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShmPutImageReq);
     swapl(&stuff->drawable);
     swapl(&stuff->gc);
@@ -1441,7 +1435,6 @@ static int _X_COLD
 SProcShmGetImage(ClientPtr client)
 {
     REQUEST(xShmGetImageReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShmGetImageReq);
     swapl(&stuff->drawable);
     swaps(&stuff->x);
@@ -1458,7 +1451,6 @@ static int _X_COLD
 SProcShmCreatePixmap(ClientPtr client)
 {
     REQUEST(xShmCreatePixmapReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShmCreatePixmapReq);
     swapl(&stuff->pid);
     swapl(&stuff->drawable);
@@ -1475,7 +1467,6 @@ SProcShmAttachFd(ClientPtr client)
 {
     REQUEST(xShmAttachFdReq);
     SetReqFds(client, 1);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShmAttachFdReq);
     swapl(&stuff->shmseg);
     return ProcShmAttachFd(client);
@@ -1485,7 +1476,6 @@ static int _X_COLD
 SProcShmCreateSegment(ClientPtr client)
 {
     REQUEST(xShmCreateSegmentReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
     swapl(&stuff->shmseg);
     swapl(&stuff->size);
commit a105c1f7a98c141f9e22e3edc64b3477765d3757
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:50:34 2024 +0200

    Xext: shape: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/shape.c b/Xext/shape.c
index e89dd9ffd..464170fc0 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -1064,9 +1064,6 @@ SShapeNotifyEvent(xShapeNotifyEvent * from, xShapeNotifyEvent * to)
 static int _X_COLD
 SProcShapeQueryVersion(ClientPtr client)
 {
-    REQUEST(xShapeQueryVersionReq);
-
-    swaps(&stuff->length);
     return ProcShapeQueryVersion(client);
 }
 
@@ -1074,8 +1071,6 @@ static int _X_COLD
 SProcShapeRectangles(ClientPtr client)
 {
     REQUEST(xShapeRectanglesReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
     swapl(&stuff->dest);
     swaps(&stuff->xOff);
@@ -1088,8 +1083,6 @@ static int _X_COLD
 SProcShapeMask(ClientPtr client)
 {
     REQUEST(xShapeMaskReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShapeMaskReq);
     swapl(&stuff->dest);
     swaps(&stuff->xOff);
@@ -1102,8 +1095,6 @@ static int _X_COLD
 SProcShapeCombine(ClientPtr client)
 {
     REQUEST(xShapeCombineReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShapeCombineReq);
     swapl(&stuff->dest);
     swaps(&stuff->xOff);
@@ -1116,8 +1107,6 @@ static int _X_COLD
 SProcShapeOffset(ClientPtr client)
 {
     REQUEST(xShapeOffsetReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShapeOffsetReq);
     swapl(&stuff->dest);
     swaps(&stuff->xOff);
@@ -1129,8 +1118,6 @@ static int _X_COLD
 SProcShapeQueryExtents(ClientPtr client)
 {
     REQUEST(xShapeQueryExtentsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShapeQueryExtentsReq);
     swapl(&stuff->window);
     return ProcShapeQueryExtents(client);
@@ -1140,8 +1127,6 @@ static int _X_COLD
 SProcShapeSelectInput(ClientPtr client)
 {
     REQUEST(xShapeSelectInputReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShapeSelectInputReq);
     swapl(&stuff->window);
     return ProcShapeSelectInput(client);
@@ -1151,8 +1136,6 @@ static int _X_COLD
 SProcShapeInputSelected(ClientPtr client)
 {
     REQUEST(xShapeInputSelectedReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShapeInputSelectedReq);
     swapl(&stuff->window);
     return ProcShapeInputSelected(client);
@@ -1162,7 +1145,6 @@ static int _X_COLD
 SProcShapeGetRectangles(ClientPtr client)
 {
     REQUEST(xShapeGetRectanglesReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xShapeGetRectanglesReq);
     swapl(&stuff->window);
     return ProcShapeGetRectangles(client);
commit cd413baa4b782f17d2ab4389a09318f3b1d6ce24
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:50:05 2024 +0200

    Xext: security: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/security.c b/Xext/security.c
index f6eefc4a7..733ae3c6e 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -612,8 +612,6 @@ static int _X_COLD
 SProcSecurityQueryVersion(ClientPtr client)
 {
     REQUEST(xSecurityQueryVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
     swaps(&stuff->majorVersion);
     swaps(&stuff->minorVersion);
@@ -627,8 +625,6 @@ SProcSecurityGenerateAuthorization(ClientPtr client)
     CARD32 *values;
     unsigned long nvalues;
     int values_offset;
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq);
     swaps(&stuff->nbytesAuthProto);
     swaps(&stuff->nbytesAuthData);
@@ -648,8 +644,6 @@ static int _X_COLD
 SProcSecurityRevokeAuthorization(ClientPtr client)
 {
     REQUEST(xSecurityRevokeAuthorizationReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
     swapl(&stuff->authId);
     return ProcSecurityRevokeAuthorization(client);
commit b52f5f9693de8746f036299aa72dba4a6cf37061
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:47:39 2024 +0200

    Xext: saver: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/saver.c b/Xext/saver.c
index 0c49427a6..b0231b031 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -1275,9 +1275,6 @@ ProcScreenSaverDispatch(ClientPtr client)
 static int _X_COLD
 SProcScreenSaverQueryVersion(ClientPtr client)
 {
-    REQUEST(xScreenSaverQueryVersionReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
     return ProcScreenSaverQueryVersion(client);
 }
 
@@ -1285,7 +1282,6 @@ static int _X_COLD
 SProcScreenSaverQueryInfo(ClientPtr client)
 {
     REQUEST(xScreenSaverQueryInfoReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
     swapl(&stuff->drawable);
     return ProcScreenSaverQueryInfo(client);
@@ -1295,7 +1291,6 @@ static int _X_COLD
 SProcScreenSaverSelectInput(ClientPtr client)
 {
     REQUEST(xScreenSaverSelectInputReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
     swapl(&stuff->drawable);
     swapl(&stuff->eventMask);
@@ -1306,7 +1301,6 @@ static int _X_COLD
 SProcScreenSaverSetAttributes(ClientPtr client)
 {
     REQUEST(xScreenSaverSetAttributesReq);
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
     swapl(&stuff->drawable);
     swaps(&stuff->x);
@@ -1324,7 +1318,6 @@ static int _X_COLD
 SProcScreenSaverUnsetAttributes(ClientPtr client)
 {
     REQUEST(xScreenSaverUnsetAttributesReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
     swapl(&stuff->drawable);
     return ProcScreenSaverUnsetAttributes(client);
@@ -1334,8 +1327,6 @@ static int _X_COLD
 SProcScreenSaverSuspend(ClientPtr client)
 {
     REQUEST(xScreenSaverSuspendReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
     swapl(&stuff->suspend);
     return ProcScreenSaverSuspend(client);
commit 23a8d9be715ce3c79ac3df59b0e352288b5e8f02
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 13:44:14 2024 +0200

    Xext: panoramiX: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c
index 4257696a1..2856a8441 100644
--- a/Xext/panoramiXSwap.c
+++ b/Xext/panoramiXSwap.c
@@ -48,10 +48,6 @@ Equipment Corporation.
 static int _X_COLD
 SProcPanoramiXQueryVersion(ClientPtr client)
 {
-    REQUEST(xPanoramiXQueryVersionReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
     return ProcPanoramiXQueryVersion(client);
 }
 
@@ -59,8 +55,6 @@ static int _X_COLD
 SProcPanoramiXGetState(ClientPtr client)
 {
     REQUEST(xPanoramiXGetStateReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
     swapl(&stuff->window);
     return ProcPanoramiXGetState(client);
@@ -70,8 +64,6 @@ static int _X_COLD
 SProcPanoramiXGetScreenCount(ClientPtr client)
 {
     REQUEST(xPanoramiXGetScreenCountReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
     swapl(&stuff->window);
     return ProcPanoramiXGetScreenCount(client);
@@ -81,8 +73,6 @@ static int _X_COLD
 SProcPanoramiXGetScreenSize(ClientPtr client)
 {
     REQUEST(xPanoramiXGetScreenSizeReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
     swapl(&stuff->window);
     swapl(&stuff->screen);
@@ -92,20 +82,12 @@ SProcPanoramiXGetScreenSize(ClientPtr client)
 static int _X_COLD
 SProcXineramaIsActive(ClientPtr client)
 {
-    REQUEST(xXineramaIsActiveReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
     return ProcXineramaIsActive(client);
 }
 
 static int _X_COLD
 SProcXineramaQueryScreens(ClientPtr client)
 {
-    REQUEST(xXineramaQueryScreensReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
     return ProcXineramaQueryScreens(client);
 }
 
commit fb40f65ee020b53c34e2b867cda662388f098ea3
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:47:45 2024 +0200

    Xext: dpms: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/dpms.c b/Xext/dpms.c
index b0dca98e1..88716f90a 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -493,8 +493,6 @@ static int _X_COLD
 SProcDPMSGetVersion(ClientPtr client)
 {
     REQUEST(xDPMSGetVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
     swaps(&stuff->majorVersion);
     swaps(&stuff->minorVersion);
@@ -504,22 +502,12 @@ SProcDPMSGetVersion(ClientPtr client)
 static int _X_COLD
 SProcDPMSCapable(ClientPtr client)
 {
-    REQUEST(xDPMSCapableReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDPMSCapableReq);
-
     return ProcDPMSCapable(client);
 }
 
 static int _X_COLD
 SProcDPMSGetTimeouts(ClientPtr client)
 {
-    REQUEST(xDPMSGetTimeoutsReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
-
     return ProcDPMSGetTimeouts(client);
 }
 
@@ -527,8 +515,6 @@ static int _X_COLD
 SProcDPMSSetTimeouts(ClientPtr client)
 {
     REQUEST(xDPMSSetTimeoutsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
 
     swaps(&stuff->standby);
@@ -540,22 +526,12 @@ SProcDPMSSetTimeouts(ClientPtr client)
 static int _X_COLD
 SProcDPMSEnable(ClientPtr client)
 {
-    REQUEST(xDPMSEnableReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDPMSEnableReq);
-
     return ProcDPMSEnable(client);
 }
 
 static int _X_COLD
 SProcDPMSDisable(ClientPtr client)
 {
-    REQUEST(xDPMSDisableReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDPMSDisableReq);
-
     return ProcDPMSDisable(client);
 }
 
@@ -563,8 +539,6 @@ static int _X_COLD
 SProcDPMSForceLevel(ClientPtr client)
 {
     REQUEST(xDPMSForceLevelReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
 
     swaps(&stuff->level);
@@ -575,11 +549,6 @@ SProcDPMSForceLevel(ClientPtr client)
 static int _X_COLD
 SProcDPMSInfo(ClientPtr client)
 {
-    REQUEST(xDPMSInfoReq);
-
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xDPMSInfoReq);
-
     return ProcDPMSInfo(client);
 }
 
@@ -587,7 +556,6 @@ static int _X_COLD
 SProcDPMSSelectInput(ClientPtr client)
 {
     REQUEST(xDPMSSelectInputReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDPMSSelectInputReq);
     swapl(&stuff->eventMask);
     return ProcDPMSSelectInput(client);
commit 4f56025812ea553bec8f16062c0d22b52938e5c9
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:47:06 2024 +0200

    Xext: bigreq: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index 13114e326..2a3012cf7 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -47,9 +47,6 @@ ProcBigReqDispatch(ClientPtr client)
     REQUEST(xBigReqEnableReq);
     xBigReqEnableReply rep;
 
-    if (client->swapped) {
-        swaps(&stuff->length);
-    }
     if (stuff->brReqType != X_BigReqEnable)
         return BadRequest;
     REQUEST_SIZE_MATCH(xBigReqEnableReq);
commit d9760ad127809ea5700f9a590ef5fdedd73be38f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:44:31 2024 +0200

    dri3: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 4af72034d..2c1d5ca85 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -676,8 +676,6 @@ sproc_dri3_query_version(ClientPtr client)
 {
     REQUEST(xDRI3QueryVersionReq);
     REQUEST_SIZE_MATCH(xDRI3QueryVersionReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->majorVersion);
     swapl(&stuff->minorVersion);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
@@ -688,8 +686,6 @@ sproc_dri3_open(ClientPtr client)
 {
     REQUEST(xDRI3OpenReq);
     REQUEST_SIZE_MATCH(xDRI3OpenReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->drawable);
     swapl(&stuff->provider);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
@@ -700,8 +696,6 @@ sproc_dri3_pixmap_from_buffer(ClientPtr client)
 {
     REQUEST(xDRI3PixmapFromBufferReq);
     REQUEST_SIZE_MATCH(xDRI3PixmapFromBufferReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->pixmap);
     swapl(&stuff->drawable);
     swapl(&stuff->size);
@@ -716,8 +710,6 @@ sproc_dri3_buffer_from_pixmap(ClientPtr client)
 {
     REQUEST(xDRI3BufferFromPixmapReq);
     REQUEST_SIZE_MATCH(xDRI3BufferFromPixmapReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->pixmap);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
 }
@@ -727,8 +719,6 @@ sproc_dri3_fence_from_fd(ClientPtr client)
 {
     REQUEST(xDRI3FenceFromFDReq);
     REQUEST_SIZE_MATCH(xDRI3FenceFromFDReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->drawable);
     swapl(&stuff->fence);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
@@ -739,8 +729,6 @@ sproc_dri3_fd_from_fence(ClientPtr client)
 {
     REQUEST(xDRI3FDFromFenceReq);
     REQUEST_SIZE_MATCH(xDRI3FDFromFenceReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->drawable);
     swapl(&stuff->fence);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
@@ -751,8 +739,6 @@ sproc_dri3_get_supported_modifiers(ClientPtr client)
 {
     REQUEST(xDRI3GetSupportedModifiersReq);
     REQUEST_SIZE_MATCH(xDRI3GetSupportedModifiersReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
 }
@@ -762,8 +748,6 @@ sproc_dri3_pixmap_from_buffers(ClientPtr client)
 {
     REQUEST(xDRI3PixmapFromBuffersReq);
     REQUEST_SIZE_MATCH(xDRI3PixmapFromBuffersReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->pixmap);
     swapl(&stuff->window);
     swaps(&stuff->width);
@@ -785,8 +769,6 @@ sproc_dri3_buffers_from_pixmap(ClientPtr client)
 {
     REQUEST(xDRI3BuffersFromPixmapReq);
     REQUEST_SIZE_MATCH(xDRI3BuffersFromPixmapReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->pixmap);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
 }
@@ -807,8 +789,6 @@ sproc_dri3_import_syncobj(ClientPtr client)
 {
     REQUEST(xDRI3ImportSyncobjReq);
     REQUEST_SIZE_MATCH(xDRI3ImportSyncobjReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->syncobj);
     swapl(&stuff->drawable);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
@@ -819,8 +799,6 @@ sproc_dri3_free_syncobj(ClientPtr client)
 {
     REQUEST(xDRI3FreeSyncobjReq);
     REQUEST_SIZE_MATCH(xDRI3FreeSyncobjReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->syncobj);
     return (*proc_dri3_vector[stuff->dri3ReqType]) (client);
 }
commit 7e2bbba067be2adf490c07dd17d5960ff83580a7
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:43:45 2024 +0200

    damage: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/damageext/damageext.c b/damageext/damageext.c
index 4f9b28e5d..c9b14b2ee 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -492,8 +492,6 @@ static int _X_COLD
 SProcDamageQueryVersion(ClientPtr client)
 {
     REQUEST(xDamageQueryVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDamageQueryVersionReq);
     swapl(&stuff->majorVersion);
     swapl(&stuff->minorVersion);
@@ -504,8 +502,6 @@ static int _X_COLD
 SProcDamageCreate(ClientPtr client)
 {
     REQUEST(xDamageCreateReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDamageCreateReq);
     swapl(&stuff->damage);
     swapl(&stuff->drawable);
@@ -516,8 +512,6 @@ static int _X_COLD
 SProcDamageDestroy(ClientPtr client)
 {
     REQUEST(xDamageDestroyReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDamageDestroyReq);
     swapl(&stuff->damage);
     return (*ProcDamageVector[stuff->damageReqType]) (client);
@@ -527,8 +521,6 @@ static int _X_COLD
 SProcDamageSubtract(ClientPtr client)
 {
     REQUEST(xDamageSubtractReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDamageSubtractReq);
     swapl(&stuff->damage);
     swapl(&stuff->repair);
@@ -540,8 +532,6 @@ static int _X_COLD
 SProcDamageAdd(ClientPtr client)
 {
     REQUEST(xDamageAddReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDamageSubtractReq);
     swapl(&stuff->drawable);
     swapl(&stuff->region);
commit fea6b995196c8a64d09c4af650cce979ba2407cd
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 10:30:48 2024 +0200

    randr: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/randr/rrsdispatch.c b/randr/rrsdispatch.c
index 627e0c220..6de8775b0 100644
--- a/randr/rrsdispatch.c
+++ b/randr/rrsdispatch.c
@@ -28,7 +28,6 @@ SProcRRQueryVersion(ClientPtr client)
     REQUEST(xRRQueryVersionReq);
 
     REQUEST_SIZE_MATCH(xRRQueryVersionReq);
-    swaps(&stuff->length);
     swapl(&stuff->majorVersion);
     swapl(&stuff->minorVersion);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -40,7 +39,6 @@ SProcRRGetScreenInfo(ClientPtr client)
     REQUEST(xRRGetScreenInfoReq);
 
     REQUEST_SIZE_MATCH(xRRGetScreenInfoReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -58,7 +56,6 @@ SProcRRSetScreenConfig(ClientPtr client)
         REQUEST_SIZE_MATCH(xRR1_0SetScreenConfigReq);
     }
 
-    swaps(&stuff->length);
     swapl(&stuff->drawable);
     swapl(&stuff->timestamp);
     swaps(&stuff->sizeID);
@@ -72,7 +69,6 @@ SProcRRSelectInput(ClientPtr client)
     REQUEST(xRRSelectInputReq);
 
     REQUEST_SIZE_MATCH(xRRSelectInputReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swaps(&stuff->enable);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -84,7 +80,6 @@ SProcRRGetScreenSizeRange(ClientPtr client)
     REQUEST(xRRGetScreenSizeRangeReq);
 
     REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -95,7 +90,6 @@ SProcRRSetScreenSize(ClientPtr client)
     REQUEST(xRRSetScreenSizeReq);
 
     REQUEST_SIZE_MATCH(xRRSetScreenSizeReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swaps(&stuff->width);
     swaps(&stuff->height);
@@ -110,7 +104,6 @@ SProcRRGetScreenResources(ClientPtr client)
     REQUEST(xRRGetScreenResourcesReq);
 
     REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -132,7 +125,6 @@ SProcRRGetOutputInfo(ClientPtr client)
     REQUEST(xRRGetOutputInfoReq);
 
     REQUEST_SIZE_MATCH(xRRGetOutputInfoReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->configTimestamp);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -144,7 +136,6 @@ SProcRRListOutputProperties(ClientPtr client)
     REQUEST(xRRListOutputPropertiesReq);
 
     REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -155,7 +146,6 @@ SProcRRQueryOutputProperty(ClientPtr client)
     REQUEST(xRRQueryOutputPropertyReq);
 
     REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->property);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -167,7 +157,6 @@ SProcRRConfigureOutputProperty(ClientPtr client)
     REQUEST(xRRConfigureOutputPropertyReq);
 
     REQUEST_AT_LEAST_SIZE(xRRConfigureOutputPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->property);
     SwapRestL(stuff);
@@ -180,7 +169,6 @@ SProcRRChangeOutputProperty(ClientPtr client)
     REQUEST(xRRChangeOutputPropertyReq);
 
     REQUEST_AT_LEAST_SIZE(xRRChangeOutputPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->property);
     swapl(&stuff->type);
@@ -207,7 +195,6 @@ SProcRRDeleteOutputProperty(ClientPtr client)
     REQUEST(xRRDeleteOutputPropertyReq);
 
     REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->property);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -219,7 +206,6 @@ SProcRRGetOutputProperty(ClientPtr client)
     REQUEST(xRRGetOutputPropertyReq);
 
     REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->property);
     swapl(&stuff->type);
@@ -236,7 +222,6 @@ SProcRRCreateMode(ClientPtr client)
     REQUEST(xRRCreateModeReq);
 
     REQUEST_AT_LEAST_SIZE(xRRCreateModeReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
 
     modeinfo = &stuff->modeInfo;
@@ -261,7 +246,6 @@ SProcRRDestroyMode(ClientPtr client)
     REQUEST(xRRDestroyModeReq);
 
     REQUEST_SIZE_MATCH(xRRDestroyModeReq);
-    swaps(&stuff->length);
     swapl(&stuff->mode);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -272,7 +256,6 @@ SProcRRAddOutputMode(ClientPtr client)
     REQUEST(xRRAddOutputModeReq);
 
     REQUEST_SIZE_MATCH(xRRAddOutputModeReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->mode);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -284,7 +267,6 @@ SProcRRDeleteOutputMode(ClientPtr client)
     REQUEST(xRRDeleteOutputModeReq);
 
     REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq);
-    swaps(&stuff->length);
     swapl(&stuff->output);
     swapl(&stuff->mode);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -296,7 +278,6 @@ SProcRRGetCrtcInfo(ClientPtr client)
     REQUEST(xRRGetCrtcInfoReq);
 
     REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     swapl(&stuff->configTimestamp);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
@@ -308,7 +289,6 @@ SProcRRSetCrtcConfig(ClientPtr client)
     REQUEST(xRRSetCrtcConfigReq);
 
     REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     swapl(&stuff->timestamp);
     swapl(&stuff->configTimestamp);
@@ -326,7 +306,6 @@ SProcRRGetCrtcGammaSize(ClientPtr client)
     REQUEST(xRRGetCrtcGammaSizeReq);
 
     REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -337,7 +316,6 @@ SProcRRGetCrtcGamma(ClientPtr client)
     REQUEST(xRRGetCrtcGammaReq);
 
     REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -348,7 +326,6 @@ SProcRRSetCrtcGamma(ClientPtr client)
     REQUEST(xRRSetCrtcGammaReq);
 
     REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     swaps(&stuff->size);
     SwapRestS(stuff);
@@ -365,7 +342,6 @@ SProcRRSetCrtcTransform(ClientPtr client)
     REQUEST(xRRSetCrtcTransformReq);
 
     REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     SwapLongs((CARD32 *) &stuff->transform,
               bytes_to_int32(sizeof(xRenderTransform)));
@@ -386,7 +362,6 @@ SProcRRGetCrtcTransform(ClientPtr client)
     REQUEST(xRRGetCrtcTransformReq);
 
     REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -397,7 +372,6 @@ SProcRRGetPanning(ClientPtr client)
     REQUEST(xRRGetPanningReq);
 
     REQUEST_SIZE_MATCH(xRRGetPanningReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     return (*ProcRandrVector[stuff->randrReqType]) (client);
 }
@@ -408,7 +382,6 @@ SProcRRSetPanning(ClientPtr client)
     REQUEST(xRRSetPanningReq);
 
     REQUEST_SIZE_MATCH(xRRSetPanningReq);
-    swaps(&stuff->length);
     swapl(&stuff->crtc);
     swapl(&stuff->timestamp);
     swaps(&stuff->left);
@@ -432,7 +405,6 @@ SProcRRSetOutputPrimary(ClientPtr client)
     REQUEST(xRRSetOutputPrimaryReq);
 
     REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapl(&stuff->output);
     return ProcRandrVector[stuff->randrReqType] (client);
@@ -444,7 +416,6 @@ SProcRRGetOutputPrimary(ClientPtr client)
     REQUEST(xRRGetOutputPrimaryReq);
 
     REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return ProcRandrVector[stuff->randrReqType] (client);
 }
@@ -455,7 +426,6 @@ SProcRRGetProviders(ClientPtr client)
     REQUEST(xRRGetProvidersReq);
 
     REQUEST_SIZE_MATCH(xRRGetProvidersReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return ProcRandrVector[stuff->randrReqType] (client);
 }
@@ -466,7 +436,6 @@ SProcRRGetProviderInfo(ClientPtr client)
     REQUEST(xRRGetProviderInfoReq);
 
     REQUEST_SIZE_MATCH(xRRGetProviderInfoReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->configTimestamp);
     return ProcRandrVector[stuff->randrReqType] (client);
@@ -478,7 +447,6 @@ SProcRRSetProviderOffloadSink(ClientPtr client)
     REQUEST(xRRSetProviderOffloadSinkReq);
 
     REQUEST_SIZE_MATCH(xRRSetProviderOffloadSinkReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->sink_provider);
     swapl(&stuff->configTimestamp);
@@ -491,7 +459,6 @@ SProcRRSetProviderOutputSource(ClientPtr client)
     REQUEST(xRRSetProviderOutputSourceReq);
 
     REQUEST_SIZE_MATCH(xRRSetProviderOutputSourceReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->source_provider);
     swapl(&stuff->configTimestamp);
@@ -504,7 +471,6 @@ SProcRRListProviderProperties(ClientPtr client)
     REQUEST(xRRListProviderPropertiesReq);
 
     REQUEST_SIZE_MATCH(xRRListProviderPropertiesReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     return ProcRandrVector[stuff->randrReqType] (client);
 }
@@ -515,7 +481,6 @@ SProcRRQueryProviderProperty(ClientPtr client)
     REQUEST(xRRQueryProviderPropertyReq);
 
     REQUEST_SIZE_MATCH(xRRQueryProviderPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->property);
     return ProcRandrVector[stuff->randrReqType] (client);
@@ -527,7 +492,6 @@ SProcRRConfigureProviderProperty(ClientPtr client)
     REQUEST(xRRConfigureProviderPropertyReq);
 
     REQUEST_AT_LEAST_SIZE(xRRConfigureProviderPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->property);
     /* TODO: no way to specify format? */
@@ -541,7 +505,6 @@ SProcRRChangeProviderProperty(ClientPtr client)
     REQUEST(xRRChangeProviderPropertyReq);
 
     REQUEST_AT_LEAST_SIZE(xRRChangeProviderPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->property);
     swapl(&stuff->type);
@@ -565,7 +528,6 @@ SProcRRDeleteProviderProperty(ClientPtr client)
     REQUEST(xRRDeleteProviderPropertyReq);
 
     REQUEST_SIZE_MATCH(xRRDeleteProviderPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->property);
     return ProcRandrVector[stuff->randrReqType] (client);
@@ -577,7 +539,6 @@ SProcRRGetProviderProperty(ClientPtr client)
     REQUEST(xRRGetProviderPropertyReq);
 
     REQUEST_SIZE_MATCH(xRRGetProviderPropertyReq);
-    swaps(&stuff->length);
     swapl(&stuff->provider);
     swapl(&stuff->property);
     swapl(&stuff->type);
@@ -591,7 +552,6 @@ SProcRRGetMonitors(ClientPtr client) {
     REQUEST(xRRGetMonitorsReq);
 
     REQUEST_SIZE_MATCH(xRRGetMonitorsReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return ProcRandrVector[stuff->randrReqType] (client);
 }
@@ -601,7 +561,6 @@ SProcRRSetMonitor(ClientPtr client) {
     REQUEST(xRRSetMonitorReq);
 
     REQUEST_AT_LEAST_SIZE(xRRGetMonitorsReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapl(&stuff->monitor.name);
     swaps(&stuff->monitor.noutput);
@@ -618,7 +577,6 @@ SProcRRDeleteMonitor(ClientPtr client) {
     REQUEST(xRRDeleteMonitorReq);
 
     REQUEST_SIZE_MATCH(xRRDeleteMonitorReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapl(&stuff->name);
     return ProcRandrVector[stuff->randrReqType] (client);
@@ -629,7 +587,6 @@ SProcRRCreateLease(ClientPtr client) {
     REQUEST(xRRCreateLeaseReq);
 
     REQUEST_AT_LEAST_SIZE(xRRCreateLeaseReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swaps(&stuff->nCrtcs);
     swaps(&stuff->nOutputs);
@@ -642,7 +599,6 @@ SProcRRFreeLease(ClientPtr client) {
     REQUEST(xRRFreeLeaseReq);
 
     REQUEST_SIZE_MATCH(xRRFreeLeaseReq);
-    swaps(&stuff->length);
     swapl(&stuff->lid);
     return ProcRandrVector[stuff->randrReqType] (client);
 }
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index db9720648..b503ce6dd 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -340,9 +340,6 @@ ProcRRXineramaDispatch(ClientPtr client)
 static int _X_COLD
 SProcRRXineramaQueryVersion(ClientPtr client)
 {
-    REQUEST(xPanoramiXQueryVersionReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
     return ProcRRXineramaQueryVersion(client);
 }
 
@@ -350,7 +347,6 @@ static int _X_COLD
 SProcRRXineramaGetState(ClientPtr client)
 {
     REQUEST(xPanoramiXGetStateReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
     swapl(&stuff->window);
     return ProcRRXineramaGetState(client);
@@ -360,7 +356,6 @@ static int _X_COLD
 SProcRRXineramaGetScreenCount(ClientPtr client)
 {
     REQUEST(xPanoramiXGetScreenCountReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
     swapl(&stuff->window);
     return ProcRRXineramaGetScreenCount(client);
@@ -370,7 +365,6 @@ static int _X_COLD
 SProcRRXineramaGetScreenSize(ClientPtr client)
 {
     REQUEST(xPanoramiXGetScreenSizeReq);
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
     swapl(&stuff->window);
     swapl(&stuff->screen);
@@ -380,18 +374,12 @@ SProcRRXineramaGetScreenSize(ClientPtr client)
 static int _X_COLD
 SProcRRXineramaIsActive(ClientPtr client)
 {
-    REQUEST(xXineramaIsActiveReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
     return ProcRRXineramaIsActive(client);
 }
 
 static int _X_COLD
 SProcRRXineramaQueryScreens(ClientPtr client)
 {
-    REQUEST(xXineramaQueryScreensReq);
-    swaps(&stuff->length);
-    REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
     return ProcRRXineramaQueryScreens(client);
 }
 
commit 00ab4ff813bf2c3c711cb27a0824741c8883d9c3
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:41:17 2024 +0200

    render: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/render/render.c b/render/render.c
index 30ba52518..c4d7f0160 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2004,7 +2004,6 @@ SProcRenderQueryVersion(ClientPtr client)
 {
     REQUEST(xRenderQueryVersionReq);
     REQUEST_SIZE_MATCH(xRenderQueryVersionReq);
-    swaps(&stuff->length);
     swapl(&stuff->majorVersion);
     swapl(&stuff->minorVersion);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
@@ -2015,7 +2014,6 @@ SProcRenderQueryPictFormats(ClientPtr client)
 {
     REQUEST(xRenderQueryPictFormatsReq);
     REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq);
-    swaps(&stuff->length);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
 }
 
@@ -2024,7 +2022,6 @@ SProcRenderQueryPictIndexValues(ClientPtr client)
 {
     REQUEST(xRenderQueryPictIndexValuesReq);
     REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq);
-    swaps(&stuff->length);
     swapl(&stuff->format);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
 }
@@ -2040,7 +2037,6 @@ SProcRenderCreatePicture(ClientPtr client)
 {
     REQUEST(xRenderCreatePictureReq);
     REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq);
-    swaps(&stuff->length);
     swapl(&stuff->pid);
     swapl(&stuff->drawable);
     swapl(&stuff->format);
@@ -2054,7 +2050,6 @@ SProcRenderChangePicture(ClientPtr client)
 {
     REQUEST(xRenderChangePictureReq);
     REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq);
-    swaps(&stuff->length);
     swapl(&stuff->picture);
     swapl(&stuff->mask);
     SwapRestL(stuff);
@@ -2066,7 +2061,6 @@ SProcRenderSetPictureClipRectangles(ClientPtr client)
 {
     REQUEST(xRenderSetPictureClipRectanglesReq);
     REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq);
-    swaps(&stuff->length);
     swapl(&stuff->picture);
     swaps(&stuff->xOrigin);
     swaps(&stuff->yOrigin);
@@ -2079,7 +2073,6 @@ SProcRenderFreePicture(ClientPtr client)
 {
     REQUEST(xRenderFreePictureReq);
     REQUEST_SIZE_MATCH(xRenderFreePictureReq);
-    swaps(&stuff->length);
     swapl(&stuff->picture);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
 }
@@ -2089,7 +2082,6 @@ SProcRenderComposite(ClientPtr client)
 {
     REQUEST(xRenderCompositeReq);
     REQUEST_SIZE_MATCH(xRenderCompositeReq);
-    swaps(&stuff->length);
     swapl(&stuff->src);
     swapl(&stuff->mask);
     swapl(&stuff->dst);
@@ -2116,7 +2108,6 @@ SProcRenderTrapezoids(ClientPtr client)
     REQUEST(xRenderTrapezoidsReq);
 
     REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq);
-    swaps(&stuff->length);
     swapl(&stuff->src);
     swapl(&stuff->dst);
     swapl(&stuff->maskFormat);
@@ -2132,7 +2123,6 @@ SProcRenderTriangles(ClientPtr client)
     REQUEST(xRenderTrianglesReq);
 
     REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq);
-    swaps(&stuff->length);
     swapl(&stuff->src);
     swapl(&stuff->dst);
     swapl(&stuff->maskFormat);
@@ -2148,7 +2138,6 @@ SProcRenderTriStrip(ClientPtr client)
     REQUEST(xRenderTriStripReq);
 
     REQUEST_AT_LEAST_SIZE(xRenderTriStripReq);
-    swaps(&stuff->length);
     swapl(&stuff->src);
     swapl(&stuff->dst);
     swapl(&stuff->maskFormat);
@@ -2164,7 +2153,6 @@ SProcRenderTriFan(ClientPtr client)
     REQUEST(xRenderTriFanReq);
 
     REQUEST_AT_LEAST_SIZE(xRenderTriFanReq);
-    swaps(&stuff->length);
     swapl(&stuff->src);
     swapl(&stuff->dst);
     swapl(&stuff->maskFormat);
@@ -2197,7 +2185,6 @@ SProcRenderCreateGlyphSet(ClientPtr client)
 {
     REQUEST(xRenderCreateGlyphSetReq);
     REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq);
-    swaps(&stuff->length);
     swapl(&stuff->gsid);
     swapl(&stuff->format);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
@@ -2208,7 +2195,6 @@ SProcRenderReferenceGlyphSet(ClientPtr client)
 {
     REQUEST(xRenderReferenceGlyphSetReq);
     REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq);
-    swaps(&stuff->length);
     swapl(&stuff->gsid);
     swapl(&stuff->existing);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
@@ -2219,7 +2205,6 @@ SProcRenderFreeGlyphSet(ClientPtr client)
 {
     REQUEST(xRenderFreeGlyphSetReq);
     REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
-    swaps(&stuff->length);
     swapl(&stuff->glyphset);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
 }
@@ -2234,7 +2219,6 @@ SProcRenderAddGlyphs(ClientPtr client)
 
     REQUEST(xRenderAddGlyphsReq);
     REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
-    swaps(&stuff->length);
     swapl(&stuff->glyphset);
     swapl(&stuff->nglyphs);
     if (stuff->nglyphs & 0xe0000000)
@@ -2269,7 +2253,6 @@ SProcRenderFreeGlyphs(ClientPtr client)
 {
     REQUEST(xRenderFreeGlyphsReq);
     REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
-    swaps(&stuff->length);
     swapl(&stuff->glyphset);
     SwapRestL(stuff);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
@@ -2300,7 +2283,6 @@ SProcRenderCompositeGlyphs(ClientPtr client)
         break;
     }
 
-    swaps(&stuff->length);
     swapl(&stuff->src);
     swapl(&stuff->dst);
     swapl(&stuff->maskFormat);
@@ -2362,7 +2344,6 @@ SProcRenderFillRectangles(ClientPtr client)
     REQUEST(xRenderFillRectanglesReq);
 
     REQUEST_AT_LEAST_SIZE(xRenderFillRectanglesReq);
-    swaps(&stuff->length);
     swapl(&stuff->dst);
     swaps(&stuff->color.red);
     swaps(&stuff->color.green);
@@ -2378,7 +2359,6 @@ SProcRenderCreateCursor(ClientPtr client)
     REQUEST(xRenderCreateCursorReq);
     REQUEST_SIZE_MATCH(xRenderCreateCursorReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->cid);
     swapl(&stuff->src);
     swaps(&stuff->x);
@@ -2392,7 +2372,6 @@ SProcRenderSetPictureTransform(ClientPtr client)
     REQUEST(xRenderSetPictureTransformReq);
     REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->picture);
     swapl(&stuff->transform.matrix11);
     swapl(&stuff->transform.matrix12);
@@ -2412,7 +2391,6 @@ SProcRenderQueryFilters(ClientPtr client)
     REQUEST(xRenderQueryFiltersReq);
     REQUEST_SIZE_MATCH(xRenderQueryFiltersReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->drawable);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
 }
@@ -2423,7 +2401,6 @@ SProcRenderSetPictureFilter(ClientPtr client)
     REQUEST(xRenderSetPictureFilterReq);
     REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->picture);
     swaps(&stuff->nbytes);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
@@ -2435,7 +2412,6 @@ SProcRenderCreateAnimCursor(ClientPtr client)
     REQUEST(xRenderCreateAnimCursorReq);
     REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->cid);
     SwapRestL(stuff);
     return (*ProcRenderVector[stuff->renderReqType]) (client);
@@ -2447,7 +2423,6 @@ SProcRenderAddTraps(ClientPtr client)
     REQUEST(xRenderAddTrapsReq);
     REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->picture);
     swaps(&stuff->xOff);
     swaps(&stuff->yOff);
@@ -2461,7 +2436,6 @@ SProcRenderCreateSolidFill(ClientPtr client)
     REQUEST(xRenderCreateSolidFillReq);
     REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->pid);
     swaps(&stuff->color.alpha);
     swaps(&stuff->color.red);
@@ -2497,7 +2471,6 @@ SProcRenderCreateLinearGradient(ClientPtr client)
     REQUEST(xRenderCreateLinearGradientReq);
     REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->pid);
     swapl(&stuff->p1.x);
     swapl(&stuff->p1.y);
@@ -2524,7 +2497,6 @@ SProcRenderCreateRadialGradient(ClientPtr client)
     REQUEST(xRenderCreateRadialGradientReq);
     REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->pid);
     swapl(&stuff->inner.x);
     swapl(&stuff->inner.y);
@@ -2553,7 +2525,6 @@ SProcRenderCreateConicalGradient(ClientPtr client)
     REQUEST(xRenderCreateConicalGradientReq);
     REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->pid);
     swapl(&stuff->center.x);
     swapl(&stuff->center.y);
commit 5bcbacce6c8010cf53c2e0c8fef7211ce0214a26
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:39:53 2024 +0200

    present: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/present/present_request.c b/present/present_request.c
index cc947b11b..02f8846c8 100644
--- a/present/present_request.c
+++ b/present/present_request.c
@@ -343,7 +343,6 @@ sproc_present_query_version(ClientPtr client)
     REQUEST(xPresentQueryVersionReq);
     REQUEST_SIZE_MATCH(xPresentQueryVersionReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->majorVersion);
     swapl(&stuff->minorVersion);
     return (*proc_present_vector[stuff->presentReqType]) (client);
@@ -355,7 +354,6 @@ sproc_present_pixmap(ClientPtr client)
     REQUEST(xPresentPixmapReq);
     REQUEST_AT_LEAST_SIZE(xPresentPixmapReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapl(&stuff->pixmap);
     swapl(&stuff->valid);
@@ -375,7 +373,6 @@ sproc_present_notify_msc(ClientPtr client)
     REQUEST(xPresentNotifyMSCReq);
     REQUEST_SIZE_MATCH(xPresentNotifyMSCReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapll(&stuff->target_msc);
     swapll(&stuff->divisor);
@@ -389,7 +386,6 @@ sproc_present_select_input (ClientPtr client)
     REQUEST(xPresentSelectInputReq);
     REQUEST_SIZE_MATCH(xPresentSelectInputReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapl(&stuff->eventMask);
     return (*proc_present_vector[stuff->presentReqType]) (client);
@@ -400,7 +396,6 @@ sproc_present_query_capabilities (ClientPtr client)
 {
     REQUEST(xPresentQueryCapabilitiesReq);
     REQUEST_SIZE_MATCH(xPresentQueryCapabilitiesReq);
-    swaps(&stuff->length);
     swapl(&stuff->target);
     return (*proc_present_vector[stuff->presentReqType]) (client);
 }
@@ -413,8 +408,6 @@ sproc_present_pixmap_synced(ClientPtr client)
     REQUEST(xPresentPixmapSyncedReq);
     REQUEST_AT_LEAST_SIZE(xPresentPixmapSyncedReq);
 
-    swaps(&stuff->length);
-
     swapl(&stuff->window);
 
     swapl(&stuff->pixmap);
commit 4454b71f4bfdd41061407997100f1ae756affc89
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:39:29 2024 +0200

    pseudoramiX: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c
index addc920f1..d2a51dbac 100644
--- a/pseudoramiX/pseudoramiX.c
+++ b/pseudoramiX/pseudoramiX.c
@@ -407,7 +407,6 @@ SProcPseudoramiXQueryVersion(ClientPtr client)
 
     TRACE;
 
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);
     return ProcPseudoramiXQueryVersion(client);
 }
@@ -419,7 +418,6 @@ SProcPseudoramiXGetState(ClientPtr client)
 
     TRACE;
 
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
     return ProcPseudoramiXGetState(client);
 }
@@ -431,7 +429,6 @@ SProcPseudoramiXGetScreenCount(ClientPtr client)
 
     TRACE;
 
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
     return ProcPseudoramiXGetScreenCount(client);
 }
@@ -443,7 +440,6 @@ SProcPseudoramiXGetScreenSize(ClientPtr client)
 
     TRACE;
 
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
     return ProcPseudoramiXGetScreenSize(client);
 }
@@ -455,7 +451,6 @@ SProcPseudoramiXIsActive(ClientPtr client)
 
     TRACE;
 
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
     return ProcPseudoramiXIsActive(client);
 }
@@ -467,7 +462,6 @@ SProcPseudoramiXQueryScreens(ClientPtr client)
 
     TRACE;
 
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
     return ProcPseudoramiXQueryScreens(client);
 }
commit b4df6f1fe3b02cdbaedda11a7f5735860f093c6f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:38:46 2024 +0200

    record: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/record/record.c b/record/record.c
index 9403cfd50..2909ac84e 100644
--- a/record/record.c
+++ b/record/record.c
@@ -2487,8 +2487,6 @@ static int _X_COLD
 SProcRecordQueryVersion(ClientPtr client)
 {
     REQUEST(xRecordQueryVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xRecordQueryVersionReq);
     swaps(&stuff->majorVersion);
     swaps(&stuff->minorVersion);
@@ -2525,7 +2523,6 @@ SProcRecordCreateContext(ClientPtr client)
     REQUEST(xRecordCreateContextReq);
     int status;
 
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xRecordCreateContextReq);
     if ((status = SwapCreateRegister(client, (void *) stuff)) != Success)
         return status;
@@ -2538,7 +2535,6 @@ SProcRecordRegisterClients(ClientPtr client)
     REQUEST(xRecordRegisterClientsReq);
     int status;
 
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xRecordRegisterClientsReq);
     if ((status = SwapCreateRegister(client, (void *) stuff)) != Success)
         return status;
@@ -2549,8 +2545,6 @@ static int _X_COLD
 SProcRecordUnregisterClients(ClientPtr client)
 {
     REQUEST(xRecordUnregisterClientsReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xRecordUnregisterClientsReq);
     swapl(&stuff->context);
     swapl(&stuff->nClients);
@@ -2562,8 +2556,6 @@ static int _X_COLD
 SProcRecordGetContext(ClientPtr client)
 {
     REQUEST(xRecordGetContextReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xRecordGetContextReq);
     swapl(&stuff->context);
     return ProcRecordGetContext(client);
@@ -2573,8 +2565,6 @@ static int _X_COLD
 SProcRecordEnableContext(ClientPtr client)
 {
     REQUEST(xRecordEnableContextReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xRecordEnableContextReq);
     swapl(&stuff->context);
     return ProcRecordEnableContext(client);
@@ -2584,8 +2574,6 @@ static int _X_COLD
 SProcRecordDisableContext(ClientPtr client)
 {
     REQUEST(xRecordDisableContextReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xRecordDisableContextReq);
     swapl(&stuff->context);
     return ProcRecordDisableContext(client);
@@ -2595,8 +2583,6 @@ static int _X_COLD
 SProcRecordFreeContext(ClientPtr client)
 {
     REQUEST(xRecordFreeContextReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xRecordFreeContextReq);
     swapl(&stuff->context);
     return ProcRecordFreeContext(client);
commit 9b88a64ba9a7978fd8cb15c9e21d5d4badd571b4
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Wed Aug 7 12:07:39 2024 +0200

    dbe: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/dbe/dbe.c b/dbe/dbe.c
index 7fa543a0f..044e45719 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -817,11 +817,7 @@ ProcDbeDispatch(ClientPtr client)
 static int _X_COLD
 SProcDbeGetVersion(ClientPtr client)
 {
-    REQUEST(xDbeGetVersionReq);
-
-    swaps(&stuff->length);
     return (ProcDbeGetVersion(client));
-
 }                               /* SProcDbeGetVersion() */
 

 /******************************************************************************
@@ -851,8 +847,6 @@ static int _X_COLD
 SProcDbeAllocateBackBufferName(ClientPtr client)
 {
     REQUEST(xDbeAllocateBackBufferNameReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq);
 
     swapl(&stuff->window);
@@ -884,8 +878,6 @@ static int _X_COLD
 SProcDbeDeallocateBackBufferName(ClientPtr client)
 {
     REQUEST(xDbeDeallocateBackBufferNameReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq);
 
     swapl(&stuff->buffer);
@@ -922,7 +914,6 @@ SProcDbeSwapBuffers(ClientPtr client)
     unsigned int i;
     xDbeSwapInfo *pSwapInfo;
 
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq);
 
     swapl(&stuff->n);
@@ -967,8 +958,6 @@ static int _X_COLD
 SProcDbeGetVisualInfo(ClientPtr client)
 {
     REQUEST(xDbeGetVisualInfoReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq);
 
     swapl(&stuff->n);
@@ -998,8 +987,6 @@ static int _X_COLD
 SProcDbeGetBackBufferAttributes(ClientPtr client)
 {
     REQUEST(xDbeGetBackBufferAttributesReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq);
 
     swapl(&stuff->buffer);
commit 96344583e415c43274dd8863d7b43ef3d8ee2e17
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:34:47 2024 +0200

    composite: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/composite/compext.c b/composite/compext.c
index 7dc784095..bb8f5946d 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -378,8 +378,6 @@ static int _X_COLD
 SProcCompositeQueryVersion(ClientPtr client)
 {
     REQUEST(xCompositeQueryVersionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeQueryVersionReq);
     swapl(&stuff->majorVersion);
     swapl(&stuff->minorVersion);
@@ -390,8 +388,6 @@ static int _X_COLD
 SProcCompositeRedirectWindow(ClientPtr client)
 {
     REQUEST(xCompositeRedirectWindowReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
     swapl(&stuff->window);
     return (*ProcCompositeVector[stuff->compositeReqType]) (client);
@@ -401,8 +397,6 @@ static int _X_COLD
 SProcCompositeRedirectSubwindows(ClientPtr client)
 {
     REQUEST(xCompositeRedirectSubwindowsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
     swapl(&stuff->window);
     return (*ProcCompositeVector[stuff->compositeReqType]) (client);
@@ -412,8 +406,6 @@ static int _X_COLD
 SProcCompositeUnredirectWindow(ClientPtr client)
 {
     REQUEST(xCompositeUnredirectWindowReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
     swapl(&stuff->window);
     return (*ProcCompositeVector[stuff->compositeReqType]) (client);
@@ -423,8 +415,6 @@ static int _X_COLD
 SProcCompositeUnredirectSubwindows(ClientPtr client)
 {
     REQUEST(xCompositeUnredirectSubwindowsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
     swapl(&stuff->window);
     return (*ProcCompositeVector[stuff->compositeReqType]) (client);
@@ -434,8 +424,6 @@ static int _X_COLD
 SProcCompositeCreateRegionFromBorderClip(ClientPtr client)
 {
     REQUEST(xCompositeCreateRegionFromBorderClipReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq);
     swapl(&stuff->region);
     swapl(&stuff->window);
@@ -446,8 +434,6 @@ static int _X_COLD
 SProcCompositeNameWindowPixmap(ClientPtr client)
 {
     REQUEST(xCompositeNameWindowPixmapReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
     swapl(&stuff->window);
     swapl(&stuff->pixmap);
@@ -458,8 +444,6 @@ static int _X_COLD
 SProcCompositeGetOverlayWindow(ClientPtr client)
 {
     REQUEST(xCompositeGetOverlayWindowReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
     swapl(&stuff->window);
     return (*ProcCompositeVector[stuff->compositeReqType]) (client);
@@ -469,8 +453,6 @@ static int _X_COLD
 SProcCompositeReleaseOverlayWindow(ClientPtr client)
 {
     REQUEST(xCompositeReleaseOverlayWindowReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
     swapl(&stuff->window);
     return (*ProcCompositeVector[stuff->compositeReqType]) (client);
commit eea9e4e84be6cb682c3f33a4a756431ec2b908a8
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:34:17 2024 +0200

    xfixes: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 561e20805..0feb46bdf 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -300,8 +300,6 @@ SProcXFixesSelectCursorInput(ClientPtr client)
 {
     REQUEST(xXFixesSelectCursorInputReq);
     REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq);
-
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapl(&stuff->eventMask);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
@@ -420,7 +418,6 @@ int _X_COLD
 SProcXFixesGetCursorImage(ClientPtr client)
 {
     REQUEST(xXFixesGetCursorImageReq);
-    swaps(&stuff->length);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
 }
 
@@ -448,8 +445,6 @@ int _X_COLD
 SProcXFixesSetCursorName(ClientPtr client)
 {
     REQUEST(xXFixesSetCursorNameReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
     swapl(&stuff->cursor);
     swaps(&stuff->nbytes);
@@ -497,8 +492,6 @@ int _X_COLD
 SProcXFixesGetCursorName(ClientPtr client)
 {
     REQUEST(xXFixesGetCursorNameReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
     swapl(&stuff->cursor);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
@@ -577,7 +570,6 @@ int _X_COLD
 SProcXFixesGetCursorImageAndName(ClientPtr client)
 {
     REQUEST(xXFixesGetCursorImageAndNameReq);
-    swaps(&stuff->length);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
 }
 
@@ -704,8 +696,6 @@ int _X_COLD
 SProcXFixesChangeCursor(ClientPtr client)
 {
     REQUEST(xXFixesChangeCursorReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesChangeCursorReq);
     swapl(&stuff->source);
     swapl(&stuff->destination);
@@ -743,8 +733,6 @@ int _X_COLD
 SProcXFixesChangeCursorByName(ClientPtr client)
 {
     REQUEST(xXFixesChangeCursorByNameReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXFixesChangeCursorByNameReq);
     swapl(&stuff->source);
     swaps(&stuff->nbytes);
@@ -902,8 +890,6 @@ int _X_COLD
 SProcXFixesHideCursor(ClientPtr client)
 {
     REQUEST(xXFixesHideCursorReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesHideCursorReq);
     swapl(&stuff->window);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
@@ -952,8 +938,6 @@ int _X_COLD
 SProcXFixesShowCursor(ClientPtr client)
 {
     REQUEST(xXFixesShowCursorReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesShowCursorReq);
     swapl(&stuff->window);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
@@ -1027,7 +1011,6 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
 
     REQUEST_AT_LEAST_SIZE(xXFixesCreatePointerBarrierReq);
 
-    swaps(&stuff->length);
     swaps(&stuff->num_devices);
     REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq,
                        pad_to_int32(stuff->num_devices * sizeof(CARD16)));
@@ -1060,8 +1043,6 @@ int _X_COLD
 SProcXFixesDestroyPointerBarrier(ClientPtr client)
 {
     REQUEST(xXFixesDestroyPointerBarrierReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq);
     swapl(&stuff->barrier);
     return ProcXFixesVector[stuff->xfixesReqType] (client);
diff --git a/xfixes/disconnect.c b/xfixes/disconnect.c
index 73aa7cfc8..937d6a4be 100644
--- a/xfixes/disconnect.c
+++ b/xfixes/disconnect.c
@@ -76,9 +76,6 @@ int _X_COLD
 SProcXFixesSetClientDisconnectMode(ClientPtr client)
 {
     REQUEST(xXFixesSetClientDisconnectModeReq);
-
-    swaps(&stuff->length);
-
     REQUEST_AT_LEAST_SIZE(xXFixesSetClientDisconnectModeReq);
 
     swapl(&stuff->disconnect_mode);
@@ -113,9 +110,6 @@ int _X_COLD
 SProcXFixesGetClientDisconnectMode(ClientPtr client)
 {
     REQUEST(xXFixesGetClientDisconnectModeReq);
-
-    swaps(&stuff->length);
-
     REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq);
 
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
diff --git a/xfixes/region.c b/xfixes/region.c
index dfa43a4dc..17c1bd4b7 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -95,8 +95,6 @@ int _X_COLD
 SProcXFixesCreateRegion(ClientPtr client)
 {
     REQUEST(xXFixesCreateRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXFixesCreateRegionReq);
     swapl(&stuff->region);
     SwapRestS(stuff);
@@ -139,8 +137,6 @@ int _X_COLD
 SProcXFixesCreateRegionFromBitmap(ClientPtr client)
 {
     REQUEST(xXFixesCreateRegionFromBitmapReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq);
     swapl(&stuff->region);
     swapl(&stuff->bitmap);
@@ -198,8 +194,6 @@ int _X_COLD
 SProcXFixesCreateRegionFromWindow(ClientPtr client)
 {
     REQUEST(xXFixesCreateRegionFromWindowReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq);
     swapl(&stuff->region);
     swapl(&stuff->window);
@@ -241,8 +235,6 @@ int _X_COLD
 SProcXFixesCreateRegionFromGC(ClientPtr client)
 {
     REQUEST(xXFixesCreateRegionFromGCReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq);
     swapl(&stuff->region);
     swapl(&stuff->gc);
@@ -283,8 +275,6 @@ int _X_COLD
 SProcXFixesCreateRegionFromPicture(ClientPtr client)
 {
     REQUEST(xXFixesCreateRegionFromPictureReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesCreateRegionFromPictureReq);
     swapl(&stuff->region);
     swapl(&stuff->picture);
@@ -307,8 +297,6 @@ int _X_COLD
 SProcXFixesDestroyRegion(ClientPtr client)
 {
     REQUEST(xXFixesDestroyRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq);
     swapl(&stuff->region);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
@@ -345,8 +333,6 @@ int _X_COLD
 SProcXFixesSetRegion(ClientPtr client)
 {
     REQUEST(xXFixesSetRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq);
     swapl(&stuff->region);
     SwapRestS(stuff);
@@ -374,8 +360,6 @@ int _X_COLD
 SProcXFixesCopyRegion(ClientPtr client)
 {
     REQUEST(xXFixesCopyRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesCopyRegionReq);
     swapl(&stuff->source);
     swapl(&stuff->destination);
@@ -416,8 +400,6 @@ int _X_COLD
 SProcXFixesCombineRegion(ClientPtr client)
 {
     REQUEST(xXFixesCombineRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesCombineRegionReq);
     swapl(&stuff->source1);
     swapl(&stuff->source2);
@@ -460,8 +442,6 @@ int _X_COLD
 SProcXFixesInvertRegion(ClientPtr client)
 {
     REQUEST(xXFixesInvertRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesInvertRegionReq);
     swapl(&stuff->source);
     swaps(&stuff->x);
@@ -490,8 +470,6 @@ int _X_COLD
 SProcXFixesTranslateRegion(ClientPtr client)
 {
     REQUEST(xXFixesTranslateRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq);
     swapl(&stuff->region);
     swaps(&stuff->dx);
@@ -519,8 +497,6 @@ int _X_COLD
 SProcXFixesRegionExtents(ClientPtr client)
 {
     REQUEST(xXFixesRegionExtentsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq);
     swapl(&stuff->source);
     swapl(&stuff->destination);
@@ -584,8 +560,6 @@ int _X_COLD
 SProcXFixesFetchRegion(ClientPtr client)
 {
     REQUEST(xXFixesFetchRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesFetchRegionReq);
     swapl(&stuff->region);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
@@ -627,8 +601,6 @@ int _X_COLD
 SProcXFixesSetGCClipRegion(ClientPtr client)
 {
     REQUEST(xXFixesSetGCClipRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq);
     swapl(&stuff->gc);
     swapl(&stuff->region);
@@ -717,8 +689,6 @@ int _X_COLD
 SProcXFixesSetWindowShapeRegion(ClientPtr client)
 {
     REQUEST(xXFixesSetWindowShapeRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
     swapl(&stuff->dest);
     swaps(&stuff->xOff);
@@ -750,8 +720,6 @@ int _X_COLD
 SProcXFixesSetPictureClipRegion(ClientPtr client)
 {
     REQUEST(xXFixesSetPictureClipRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq);
     swapl(&stuff->picture);
     swapl(&stuff->region);
@@ -803,8 +771,6 @@ int _X_COLD
 SProcXFixesExpandRegion(ClientPtr client)
 {
     REQUEST(xXFixesExpandRegionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xXFixesExpandRegionReq);
     swapl(&stuff->source);
     swapl(&stuff->destination);
diff --git a/xfixes/saveset.c b/xfixes/saveset.c
index 3db5c6634..145c146df 100644
--- a/xfixes/saveset.c
+++ b/xfixes/saveset.c
@@ -64,7 +64,6 @@ SProcXFixesChangeSaveSet(ClientPtr client)
     REQUEST(xXFixesChangeSaveSetReq);
     REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->window);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
 }
diff --git a/xfixes/select.c b/xfixes/select.c
index 81b151199..665a288aa 100644
--- a/xfixes/select.c
+++ b/xfixes/select.c
@@ -202,9 +202,7 @@ int _X_COLD
 SProcXFixesSelectSelectionInput(ClientPtr client)
 {
     REQUEST(xXFixesSelectSelectionInputReq);
-
     REQUEST_SIZE_MATCH(xXFixesSelectSelectionInputReq);
-    swaps(&stuff->length);
     swapl(&stuff->window);
     swapl(&stuff->selection);
     swapl(&stuff->eventMask);
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 0b89cdeda..e9758b2f0 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -164,7 +164,6 @@ SProcXFixesQueryVersion(ClientPtr client)
     REQUEST(xXFixesQueryVersionReq);
     REQUEST_SIZE_MATCH(xXFixesQueryVersionReq);
 
-    swaps(&stuff->length);
     swapl(&stuff->majorVersion);
     swapl(&stuff->minorVersion);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
commit 9af095e121f1806ae4c0a0d25dacf77f82b82b06
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 14:29:26 2024 +0200

    xkb: drop swapping request length fields
    
    The request struct's length fields aren't used anymore - we have the
    client->req_len field instead, which also is bigreq-compatible.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c
index 6a178d7de..00fd04d38 100644
--- a/xkb/xkbSwap.c
+++ b/xkb/xkbSwap.c
@@ -43,8 +43,6 @@ static int _X_COLD
 SProcXkbUseExtension(ClientPtr client)
 {
     REQUEST(xkbUseExtensionReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbUseExtensionReq);
     swaps(&stuff->wantedMajor);
     swaps(&stuff->wantedMinor);
@@ -55,8 +53,6 @@ static int _X_COLD
 SProcXkbSelectEvents(ClientPtr client)
 {
     REQUEST(xkbSelectEventsReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSelectEventsReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->affectWhich);
@@ -133,8 +129,6 @@ static int _X_COLD
 SProcXkbBell(ClientPtr client)
 {
     REQUEST(xkbBellReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbBellReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->bellClass);
@@ -150,8 +144,6 @@ static int _X_COLD
 SProcXkbGetState(ClientPtr client)
 {
     REQUEST(xkbGetStateReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetStateReq);
     swaps(&stuff->deviceSpec);
     return ProcXkbGetState(client);
@@ -161,8 +153,6 @@ static int _X_COLD
 SProcXkbLatchLockState(ClientPtr client)
 {
     REQUEST(xkbLatchLockStateReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbLatchLockStateReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->groupLatch);
@@ -173,8 +163,6 @@ static int _X_COLD
 SProcXkbGetControls(ClientPtr client)
 {
     REQUEST(xkbGetControlsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetControlsReq);
     swaps(&stuff->deviceSpec);
     return ProcXkbGetControls(client);
@@ -184,8 +172,6 @@ static int _X_COLD
 SProcXkbSetControls(ClientPtr client)
 {
     REQUEST(xkbSetControlsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbSetControlsReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->affectInternalVMods);
@@ -217,8 +203,6 @@ static int _X_COLD
 SProcXkbGetMap(ClientPtr client)
 {
     REQUEST(xkbGetMapReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetMapReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->full);
@@ -231,8 +215,6 @@ static int _X_COLD
 SProcXkbSetMap(ClientPtr client)
 {
     REQUEST(xkbSetMapReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSetMapReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->present);
@@ -247,8 +229,6 @@ static int _X_COLD
 SProcXkbGetCompatMap(ClientPtr client)
 {
     REQUEST(xkbGetCompatMapReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetCompatMapReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->firstSI);
@@ -260,8 +240,6 @@ static int _X_COLD
 SProcXkbSetCompatMap(ClientPtr client)
 {
     REQUEST(xkbSetCompatMapReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSetCompatMapReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->firstSI);
@@ -273,8 +251,6 @@ static int _X_COLD
 SProcXkbGetIndicatorState(ClientPtr client)
 {
     REQUEST(xkbGetIndicatorStateReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetIndicatorStateReq);
     swaps(&stuff->deviceSpec);
     return ProcXkbGetIndicatorState(client);
@@ -284,8 +260,6 @@ static int _X_COLD
 SProcXkbGetIndicatorMap(ClientPtr client)
 {
     REQUEST(xkbGetIndicatorMapReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq);
     swaps(&stuff->deviceSpec);
     swapl(&stuff->which);
@@ -296,8 +270,6 @@ static int _X_COLD
 SProcXkbSetIndicatorMap(ClientPtr client)
 {
     REQUEST(xkbSetIndicatorMapReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq);
     swaps(&stuff->deviceSpec);
     swapl(&stuff->which);
@@ -308,8 +280,6 @@ static int _X_COLD
 SProcXkbGetNamedIndicator(ClientPtr client)
 {
     REQUEST(xkbGetNamedIndicatorReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->ledClass);
@@ -322,8 +292,6 @@ static int _X_COLD
 SProcXkbSetNamedIndicator(ClientPtr client)
 {
     REQUEST(xkbSetNamedIndicatorReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->ledClass);
@@ -338,8 +306,6 @@ static int _X_COLD
 SProcXkbGetNames(ClientPtr client)
 {
     REQUEST(xkbGetNamesReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetNamesReq);
     swaps(&stuff->deviceSpec);
     swapl(&stuff->which);
@@ -350,8 +316,6 @@ static int _X_COLD
 SProcXkbSetNames(ClientPtr client)
 {
     REQUEST(xkbSetNamesReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSetNamesReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->virtualMods);
@@ -365,8 +329,6 @@ static int _X_COLD
 SProcXkbGetGeometry(ClientPtr client)
 {
     REQUEST(xkbGetGeometryReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetGeometryReq);
     swaps(&stuff->deviceSpec);
     swapl(&stuff->name);
@@ -377,8 +339,6 @@ static int _X_COLD
 SProcXkbSetGeometry(ClientPtr client)
 {
     REQUEST(xkbSetGeometryReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq);
     swaps(&stuff->deviceSpec);
     swapl(&stuff->name);
@@ -395,8 +355,6 @@ static int _X_COLD
 SProcXkbPerClientFlags(ClientPtr client)
 {
     REQUEST(xkbPerClientFlagsReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbPerClientFlagsReq);
     swaps(&stuff->deviceSpec);
     swapl(&stuff->change);
@@ -411,8 +369,6 @@ static int _X_COLD
 SProcXkbListComponents(ClientPtr client)
 {
     REQUEST(xkbListComponentsReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbListComponentsReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->maxNames);
@@ -423,8 +379,6 @@ static int _X_COLD
 SProcXkbGetKbdByName(ClientPtr client)
 {
     REQUEST(xkbGetKbdByNameReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->want);
@@ -436,8 +390,6 @@ static int _X_COLD
 SProcXkbGetDeviceInfo(ClientPtr client)
 {
     REQUEST(xkbGetDeviceInfoReq);
-
-    swaps(&stuff->length);
     REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->wanted);
@@ -450,8 +402,6 @@ static int _X_COLD
 SProcXkbSetDeviceInfo(ClientPtr client)
 {
     REQUEST(xkbSetDeviceInfoReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq);
     swaps(&stuff->deviceSpec);
     swaps(&stuff->change);
@@ -463,8 +413,6 @@ static int _X_COLD
 SProcXkbSetDebuggingFlags(ClientPtr client)
 {
     REQUEST(xkbSetDebuggingFlagsReq);
-
-    swaps(&stuff->length);
     REQUEST_AT_LEAST_SIZE(xkbSetDebuggingFlagsReq);
     swapl(&stuff->affectFlags);
     swapl(&stuff->flags);
commit 44c063d93ddb6802eb77f2d604aa2fb68be54477
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:59:57 2024 +0200

    Xext: xtest: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/xtest.c b/Xext/xtest.c
index 12665d4d0..b8bdd8208 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -197,7 +197,7 @@ ProcXTestFakeInput(ClientPtr client)
     int flags = 0;
     int need_ptr_update = 1;
 
-    nev = (stuff->length << 2) - sizeof(xReq);
+    nev = (client->req_len << 2) - sizeof(xReq);
     if ((nev % sizeof(xEvent)) || !nev)
         return BadLength;
     nev /= sizeof(xEvent);
@@ -514,7 +514,7 @@ XTestSwapFakeInput(ClientPtr client, xReq * req)
     xEvent sev;
     EventSwapPtr proc;
 
-    nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent);
+    nev = ((client->req_len << 2) - sizeof(xReq)) / sizeof(xEvent);
     for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) {
         int evtype = ev->u.u.type & 0177;
         /* Swap event */
commit c3e1f6fccf4abfbfde1a246cce8f70e95d6b28b6
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:59:38 2024 +0200

    Xext: vidmode: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/vidmode.c b/Xext/vidmode.c
index 1bc98a8af..db138b646 100644
--- a/Xext/vidmode.c
+++ b/Xext/vidmode.c
@@ -469,7 +469,7 @@ ProcVidModeAddModeLine(ClientPtr client)
     if (ver < 2) {
         /* convert from old format */
         stuff = &newstuff;
-        stuff->length = oldstuff->length;
+        stuff->length = client->req_len;
         stuff->screen = oldstuff->screen;
         stuff->dotclock = oldstuff->dotclock;
         stuff->hdisplay = oldstuff->hdisplay;
@@ -639,7 +639,7 @@ ProcVidModeDeleteModeLine(ClientPtr client)
     if (ver < 2) {
         /* convert from old format */
         stuff = &newstuff;
-        stuff->length = oldstuff->length;
+        stuff->length = client->req_len;
         stuff->screen = oldstuff->screen;
         stuff->dotclock = oldstuff->dotclock;
         stuff->hdisplay = oldstuff->hdisplay;
@@ -668,7 +668,7 @@ ProcVidModeDeleteModeLine(ClientPtr client)
                "len = %d, length = %d\n",
                (unsigned long) client->req_len,
                (int) sizeof(xXF86VidModeDeleteModeLineReq) >> 2,
-               (unsigned long) stuff->privsize, len, stuff->length);
+               (unsigned long) stuff->privsize, len, client->req_len);
         return BadLength;
     }
 
@@ -763,7 +763,7 @@ ProcVidModeModModeLine(ClientPtr client)
     if (ver < 2) {
         /* convert from old format */
         stuff = &newstuff;
-        stuff->length = oldstuff->length;
+        stuff->length = client->req_len;
         stuff->screen = oldstuff->screen;
         stuff->hdisplay = oldstuff->hdisplay;
         stuff->hsyncstart = oldstuff->hsyncstart;
@@ -897,7 +897,7 @@ ProcVidModeValidateModeLine(ClientPtr client)
     if (ver < 2) {
         /* convert from old format */
         stuff = &newstuff;
-        stuff->length = oldstuff->length;
+        stuff->length = client->req_len;
         stuff->screen = oldstuff->screen;
         stuff->dotclock = oldstuff->dotclock;
         stuff->hdisplay = oldstuff->hdisplay;
@@ -1050,7 +1050,7 @@ ProcVidModeSwitchToMode(ClientPtr client)
     if (ver < 2) {
         /* convert from old format */
         stuff = &newstuff;
-        stuff->length = oldstuff->length;
+        stuff->length = client->req_len;
         stuff->screen = oldstuff->screen;
         stuff->dotclock = oldstuff->dotclock;
         stuff->hdisplay = oldstuff->hdisplay;
commit dab12997453994d717982bf53b7817ffcd5560ea
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:59:11 2024 +0200

    Xext: shape: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/shape.c b/Xext/shape.c
index e0410129f..e89dd9ffd 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -258,7 +258,7 @@ ShapeRectangles(ClientPtr client, xShapeRectanglesReq *stuff)
         client->errorValue = stuff->ordering;
         return BadValue;
     }
-    nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq));
+    nrects = ((client->req_len << 2) - sizeof(xShapeRectanglesReq));
     if (nrects & 4)
         return BadLength;
     nrects >>= 3;
commit 67a3319d73a3484b5acbf8ac2b45ca4b80206b4c
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:58:44 2024 +0200

    Xext: security: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/security.c b/Xext/security.c
index 762513db1..f6eefc4a7 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -636,10 +636,10 @@ SProcSecurityGenerateAuthorization(ClientPtr client)
     values_offset = bytes_to_int32(stuff->nbytesAuthProto) +
         bytes_to_int32(stuff->nbytesAuthData);
     if (values_offset >
-        stuff->length - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq))
+        client->req_len - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq))
         return BadLength;
     values = (CARD32 *) (&stuff[1]) + values_offset;
-    nvalues = (((CARD32 *) stuff) + stuff->length) - values;
+    nvalues = (((CARD32 *) stuff) + client->req_len) - values;
     SwapLongs(values, nvalues);
     return ProcSecurityGenerateAuthorization(client);
 }                               /* SProcSecurityGenerateAuthorization */
commit bacc4b1477942597bf6dd591366ac1fd84faef4c
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:58:11 2024 +0200

    Xext: saver: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xext/saver.c b/Xext/saver.c
index ad06f9bdb..0c49427a6 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -748,7 +748,7 @@ ScreenSaverSetAttributes(ClientPtr client)
     if (ret != Success)
         return ret;
 
-    len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
+    len = client->req_len - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
     if (Ones(stuff->mask) != len)
         return BadLength;
     if (!stuff->width || !stuff->height) {
@@ -1097,7 +1097,7 @@ ProcScreenSaverSetAttributes(ClientPtr client)
             return (status == BadValue) ? BadDrawable : status;
 
         len =
-            stuff->length -
+            client->req_len -
             bytes_to_int32(sizeof(xScreenSaverSetAttributesReq));
         if (Ones(stuff->mask) != len)
             return BadLength;
commit ef396a28b76db135dbc746c52bdc644554a8eb50
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:56:39 2024 +0200

    xquartz: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 4441038f5..254931f0b 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -387,7 +387,7 @@ ProcAppleWMSetWindowMenu(register ClientPtr client)
         return BadAlloc;
     }
 
-    max_len = (stuff->length << 2) - sizeof(xAppleWMSetWindowMenuReq);
+    max_len = (client->req-len << 2) - sizeof(xAppleWMSetWindowMenuReq);
     bytes = (char *)&stuff[1];
 
     for (i = j = 0; i < max_len && j < nitems;) {
@@ -601,7 +601,7 @@ ProcAppleWMFrameDraw(register ClientPtr client)
     or = make_box(stuff->ox, stuff->oy, stuff->ow, stuff->oh);
 
     title_length = stuff->title_length;
-    title_max = (stuff->length << 2) - sizeof(xAppleWMFrameDrawReq);
+    title_max = (client->req_len << 2) - sizeof(xAppleWMFrameDrawReq);
 
     if (title_max < title_length)
         return BadValue;
commit a623060185921dd57c25cd57d33ee64748ed152a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:55:38 2024 +0200

    xkb: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/xkb/xkb.c b/xkb/xkb.c
index aaf9716b3..9ede6f969 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -255,7 +255,7 @@ ProcXkbSelectEvents(ClientPtr client)
         register unsigned bit, ndx, maskLeft, dataLeft, size;
 
         from.c8 = (CARD8 *) &stuff[1];
-        dataLeft = (stuff->length * 4) - SIZEOF(xkbSelectEventsReq);
+        dataLeft = (client->req_len * 4) - sizeof(xkbSelectEventsReq);
         maskLeft = (stuff->affectWhich & (~XkbMapNotifyMask));
         for (ndx = 0, bit = 1; (maskLeft != 0); ndx++, bit <<= 1) {
             if ((bit & maskLeft) == 0)
@@ -3372,7 +3372,7 @@ ProcXkbSetIndicatorMap(ClientPtr client)
         if (stuff->which & bit)
             nIndicators++;
     }
-    if (stuff->length != ((SIZEOF(xkbSetIndicatorMapReq) +
+    if (client->req_len != ((sizeof(xkbSetIndicatorMapReq) +
                            (nIndicators * SIZEOF(xkbIndicatorMapWireDesc))) /
                           4)) {
         return BadLength;
@@ -4276,8 +4276,8 @@ _XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev,
             return BadAtom;
         }
     }
-    if ((tmp - ((CARD32 *) stuff)) != stuff->length) {
-        client->errorValue = stuff->length;
+    if ((tmp - ((CARD32 *) stuff)) != client->req_len) {
+        client->errorValue = client->req_len;
         return BadLength;
     }
 
@@ -5872,11 +5872,11 @@ ProcXkbListComponents(ClientPtr client)
             return BadLength;
         size = *((uint8_t *)str);
         len = (str + size + 1) - ((unsigned char *) stuff);
-        if ((XkbPaddedSize(len) / 4) > stuff->length)
+        if ((XkbPaddedSize(len) / 4) > client->req_len)
             return BadLength;
         str += (size + 1);
     }
-    if ((XkbPaddedSize(len) / 4) != stuff->length)
+    if ((XkbPaddedSize(len) / 4) != client->req_len)
         return BadLength;
     rep = (xkbListComponentsReply) {
         .type = X_Reply,
@@ -5958,7 +5958,7 @@ ProcXkbGetKbdByName(ClientPtr client)
     names.geometry = GetComponentSpec(client, stuff, &str, TRUE, &status);
     if (status == Success) {
         len = str - ((unsigned char *) stuff);
-        if ((XkbPaddedSize(len) / 4) != stuff->length)
+        if ((XkbPaddedSize(len) / 4) != client->req_len)
             status = BadLength;
     }
 
@@ -6819,7 +6819,7 @@ _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev,
         if (status != Success)
             return status;
     }
-    if (((wire - ((char *) stuff)) / 4) != stuff->length)
+    if (((wire - ((char *) stuff)) / 4) != client->req_len)
         return BadLength;
 
     return Success;
@@ -6974,7 +6974,7 @@ ProcXkbSetDebuggingFlags(ClientPtr client)
             ErrorF("[xkb] XkbDebug: Setting debug controls to 0x%lx\n",
                    (long) newCtrls);
     }
-    extraLength = (stuff->length << 2) - sz_xkbSetDebuggingFlagsReq;
+    extraLength = (client->req_len << 2) - sz_xkbSetDebuggingFlagsReq;
     if (stuff->msgLength > 0) {
         char *msg;
 
commit 4b2115a182bbfb8e911ec61d0c73455035bc8c70
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 15:54:22 2024 +0200

    randr: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index b47f0aeac..42421b1ce 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -1305,7 +1305,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
     CARD8 status;
 
     REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq);
-    numOutputs = (stuff->length - bytes_to_int32(SIZEOF(xRRSetCrtcConfigReq)));
+    numOutputs = (client->req_len - bytes_to_int32(sizeof(xRRSetCrtcConfigReq)));
 
     VERIFY_RR_CRTC(stuff->crtc, crtc, DixSetAttrAccess);
 
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 23d5c70d8..20ff4525d 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -304,7 +304,7 @@ ProcRRCreateMode(ClientPtr client)
 
     modeInfo = &stuff->modeInfo;
     name = (char *) (stuff + 1);
-    units_after = (stuff->length - bytes_to_int32(sizeof(xRRCreateModeReq)));
+    units_after = (client->req_len - bytes_to_int32(sizeof(xRRCreateModeReq)));
 
     /* check to make sure requested name fits within the data provided */
     if (bytes_to_int32(modeInfo->nameLength) > units_after)
diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c
index 9280061ff..b3712c0ca 100644
--- a/randr/rrmonitor.c
+++ b/randr/rrmonitor.c
@@ -672,7 +672,7 @@ ProcRRSetMonitor(ClientPtr client)
 
     REQUEST_AT_LEAST_SIZE(xRRSetMonitorReq);
 
-    if (stuff->monitor.noutput != stuff->length - (SIZEOF(xRRSetMonitorReq) >> 2))
+    if (stuff->monitor.noutput != client->req_len - (sizeof(xRRSetMonitorReq) >> 2))
         return BadLength;
 
     r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess);
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 6f8cbb8bb..f97c3464f 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -520,7 +520,7 @@ ProcRRConfigureOutputProperty(ClientPtr client)
         return BadAccess;
 
     num_valid =
-        stuff->length - bytes_to_int32(sizeof(xRRConfigureOutputPropertyReq));
+        client->req_len - bytes_to_int32(sizeof(xRRConfigureOutputPropertyReq));
     return RRConfigureOutputProperty(output, stuff->property, stuff->pending,
                                      stuff->range, FALSE, num_valid,
                                      (INT32 *) (stuff + 1));
diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c
index d26cf598d..69f66ed27 100644
--- a/randr/rrproviderproperty.c
+++ b/randr/rrproviderproperty.c
@@ -487,7 +487,7 @@ ProcRRConfigureProviderProperty(ClientPtr client)
     VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess);
 
     num_valid =
-        stuff->length - bytes_to_int32(sizeof(xRRConfigureProviderPropertyReq));
+        client->req_len - bytes_to_int32(sizeof(xRRConfigureProviderPropertyReq));
     return RRConfigureProviderProperty(provider, stuff->property, stuff->pending,
                                      stuff->range, FALSE, num_valid,
                                      (INT32 *) (stuff + 1));
commit fc9f8f8d3cd0ca27a0df36bf200ce86fbf83424a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Aug 6 11:39:09 2024 +0200

    Xi: fix length checking with bigreq
    
    The authorative source of the request frame size is client->req_len,
    especially with big requests larger than 2^18 bytes.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>

diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 188d92fc5..71fab9d8c 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -116,7 +116,7 @@ ProcXChangeDeviceControl(ClientPtr client)
     REQUEST(xChangeDeviceControlReq);
     REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
 
-    len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq));
+    len = client->req_len - bytes_to_int32(sizeof(xChangeDeviceControlReq));
     ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (ret != Success)
         goto out;
diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c
index 19213f421..c51e667fb 100644
--- a/Xi/chgfctl.c
+++ b/Xi/chgfctl.c
@@ -436,7 +436,7 @@ ProcXChangeFeedbackControl(ClientPtr client)
     REQUEST(xChangeFeedbackControlReq);
     REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
 
-    len = stuff->length - bytes_to_int32(sizeof(xChangeFeedbackControlReq));
+    len = client->req_len - bytes_to_int32(sizeof(xChangeFeedbackControlReq));
     rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (rc != Success)
         return rc;
diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c
index 282d327d1..936efc6c7 100644
--- a/Xi/chgkmap.c
+++ b/Xi/chgkmap.c
@@ -106,7 +106,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client)
     ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
     if (ret != Success)
         return ret;
-    len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq));
+    len = client->req_len - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq));
 
     ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify,
                            stuff->firstKeyCode, stuff->keyCodes,
diff --git a/Xi/chgprop.c b/Xi/chgprop.c
index 78b4d2163..f369c4d84 100644
--- a/Xi/chgprop.c
+++ b/Xi/chgprop.c
@@ -102,7 +102,7 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client)
     REQUEST(xChangeDeviceDontPropagateListReq);
     REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xChangeDeviceDontPropagateListReq)) +
         stuff->count)
         return BadLength;
diff --git a/Xi/getvers.c b/Xi/getvers.c
index 98fc2a199..6bcca1056 100644
--- a/Xi/getvers.c
+++ b/Xi/getvers.c
@@ -92,7 +92,7 @@ ProcXGetExtensionVersion(ClientPtr client)
     REQUEST(xGetExtensionVersionReq);
     REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
 
-    if (stuff->length != bytes_to_int32(sizeof(xGetExtensionVersionReq) +
+    if (client->req_len != bytes_to_int32(sizeof(xGetExtensionVersionReq) +
                                         stuff->nbytes))
         return BadLength;
 
diff --git a/Xi/grabdev.c b/Xi/grabdev.c
index db6a72335..146d313de 100644
--- a/Xi/grabdev.c
+++ b/Xi/grabdev.c
@@ -82,7 +82,7 @@ SProcXGrabDevice(ClientPtr client)
     swapl(&stuff->time);
     swaps(&stuff->event_count);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
         return BadLength;
 
@@ -109,7 +109,7 @@ ProcXGrabDevice(ClientPtr client)
     REQUEST(xGrabDeviceReq);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
         return BadLength;
 
diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c
index 124ce4fbe..ffd55627d 100644
--- a/Xi/grabdevb.c
+++ b/Xi/grabdevb.c
@@ -106,7 +106,7 @@ ProcXGrabDeviceButton(ClientPtr client)
     REQUEST(xGrabDeviceButtonReq);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count)
         return BadLength;
 
diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c
index 26dd30fbc..4e278b747 100644
--- a/Xi/grabdevk.c
+++ b/Xi/grabdevk.c
@@ -104,7 +104,7 @@ ProcXGrabDeviceKey(ClientPtr client)
     REQUEST(xGrabDeviceKeyReq);
     REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count)
         return BadLength;
 
diff --git a/Xi/selectev.c b/Xi/selectev.c
index 02ab1adcc..a8c7f0c45 100644
--- a/Xi/selectev.c
+++ b/Xi/selectev.c
@@ -148,7 +148,7 @@ ProcXSelectExtensionEvent(ClientPtr client)
     REQUEST(xSelectExtensionEventReq);
     REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count)
         return BadLength;
 
diff --git a/Xi/sendexev.c b/Xi/sendexev.c
index 9e66bf1d3..d116909bb 100644
--- a/Xi/sendexev.c
+++ b/Xi/sendexev.c
@@ -87,7 +87,7 @@ SProcXSendExtensionEvent(ClientPtr client)
     swapl(&stuff->destination);
     swaps(&stuff->count);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
         bytes_to_int32(stuff->num_events * sizeof(xEvent)))
         return BadLength;
@@ -133,7 +133,7 @@ ProcXSendExtensionEvent(ClientPtr client)
     REQUEST(xSendExtensionEventReq);
     REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count +
         (stuff->num_events * bytes_to_int32(sizeof(xEvent))))
         return BadLength;
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index 477d86e92..b05ae07a1 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -92,7 +92,7 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
     REQUEST(xSetDeviceButtonMappingReq);
     REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq);
 
-    if (stuff->length !=
+    if (client->req_len !=
         bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length))
         return BadLength;
 
diff --git a/Xi/setdval.c b/Xi/setdval.c
index 175b84cf7..26fed9094 100644
--- a/Xi/setdval.c
+++ b/Xi/setdval.c
@@ -100,7 +100,7 @@ ProcXSetDeviceValuators(ClientPtr client)
         .status = Success
     };
 
-    if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
+    if (client->req_len != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) +
         stuff->num_valuators)
         return BadLength;
 
diff --git a/Xi/setmmap.c b/Xi/setmmap.c
index 0f639cff8..5e6c0831f 100644
--- a/Xi/setmmap.c
+++ b/Xi/setmmap.c
@@ -94,7 +94,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client)
     REQUEST(xSetDeviceModifierMappingReq);
     REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq);
 
-    if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) +
+    if (client->req_len != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) +
         (stuff->numKeyPerModifier << 1))
         return BadLength;
 
diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index 63c5ac994..7c0231417 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -54,7 +54,7 @@ SProcXIAllowEvents(ClientPtr client)
     swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->time);
-    if (stuff->length > 3) {
+    if (client->req_len > 3) {
         xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff;
 
         REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index 51de4d7bc..701a0f3b8 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -125,7 +125,7 @@ SProcXISelectEvents(ClientPtr client)
     swapl(&stuff->win);
     swaps(&stuff->num_masks);
 
-    len = stuff->length - bytes_to_int32(sizeof(xXISelectEventsReq));
+    len = client->req_len - bytes_to_int32(sizeof(xXISelectEventsReq));
     evmask = (xXIEventMask *) &stuff[1];
     for (i = 0; i < stuff->num_masks; i++) {
         if (len < bytes_to_int32(sizeof(xXIEventMask)))
@@ -172,7 +172,7 @@ ProcXISelectEvents(ClientPtr client)
     while (num_masks--) {
         len += sizeof(xXIEventMask) + evmask->mask_len * 4;
 
-        if (bytes_to_int32(len) > stuff->length)
+        if (bytes_to_int32(len) > client->req_len)
             return BadLength;
 
         if (evmask->deviceid != XIAllDevices &&
@@ -298,7 +298,7 @@ ProcXISelectEvents(ClientPtr client)
         evmask++;
     }
 
-    if (bytes_to_int32(len) != stuff->length)
+    if (bytes_to_int32(len) != client->req_len)
         return BadLength;
 
     /* Set masks on window */


More information about the xorg-commit mailing list