xserver: Branch 'master' - 19 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Sep 1 22:12:08 UTC 2024


 Xext/saver.c                    |    1 
 dix/colormap.c                  |   34 ++++++++------
 dix/colormap_priv.h             |   52 +++++++++++++++++++++
 dix/dispatch.c                  |    5 +-
 dix/resource.c                  |    1 
 dix/window.c                    |    1 
 doc/Xserver-spec.xml            |    2 
 fb/fbcmap_mi.c                  |    3 +
 hw/kdrive/src/kcmap.c           |    2 
 hw/vfb/InitOutput.c             |    1 
 hw/xfree86/common/xf86DGA.c     |    1 
 hw/xfree86/ramdac/xf86HWCurs.c  |    6 +-
 hw/xnest/Color.c                |    2 
 hw/xwin/wincmap.c               |    2 
 hw/xwin/winshadddnl.c           |    4 +
 hw/xwin/winshadgdi.c            |    4 +
 include/colormap.h              |   95 ----------------------------------------
 include/colormapst.h            |    4 -
 mi/micmap.c                     |    3 +
 mi/misprite.c                   |    5 +-
 miext/rootless/rootlessScreen.c |   12 ++---
 render/miindex.c                |    2 
 render/picture.c                |    2 
 23 files changed, 119 insertions(+), 125 deletions(-)

New commits:
commit 1bfa4876f688412c97043408561a4d895ebf08cc
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:50:24 2024 +0200

    dix: move colormap flags into colormap_priv.h and rename them
    
    These aren't used by any drivers/modules, so no need to keep them exported.
    As already touching them, give them a proper name prefix for clarity.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap.c b/dix/colormap.c
index 193f286bd..b7ce8da5e 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -292,7 +292,7 @@ CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
     pmap->mid = mid;
     pmap->flags = 0;            /* start out with all flags clear */
     if (mid == pScreen->defColormap)
-        pmap->flags |= IsDefault;
+        pmap->flags |= CM_IsDefault;
     pmap->pScreen = pScreen;
     pmap->pVisual = pVisual;
     pmap->class = class;
@@ -306,7 +306,7 @@ CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
         *pptr = (Pixel *) NULL;
     if (alloc == AllocAll) {
         if (class & DynamicClass)
-            pmap->flags |= AllAllocated;
+            pmap->flags |= CM_AllAllocated;
         for (pent = &pmap->red[size - 1]; pent >= pmap->red; pent--)
             pent->refcnt = AllocPrivate;
         pmap->freeRed = 0;
@@ -379,7 +379,7 @@ CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
             pmap->numPixelsBlue[client] = size;
         }
     }
-    pmap->flags |= BeingCreated;
+    pmap->flags |= CM_BeingCreated;
 
     if (!AddResource(mid, X11_RESTYPE_COLORMAP, (void *) pmap))
         return BadAlloc;
@@ -401,7 +401,7 @@ CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
         FreeResource(mid, X11_RESTYPE_NONE);
         return BadAlloc;
     }
-    pmap->flags &= ~BeingCreated;
+    pmap->flags &= ~CM_BeingCreated;
     *ppcmap = pmap;
     return Success;
 }
@@ -451,7 +451,7 @@ FreeColormap(void *value, XID mid)
         }
     }
 
-    if (pmap->flags & IsDefault) {
+    if (pmap->flags & CM_IsDefault) {
         dixFreePrivates(pmap->devPrivates, PRIVATE_COLORMAP);
         free(pmap);
     }
@@ -548,7 +548,7 @@ CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client)
     pScreen = pSrc->pScreen;
     pVisual = pSrc->pVisual;
     midSrc = pSrc->mid;
-    alloc = ((pSrc->flags & AllAllocated) && CLIENT_ID(midSrc) == client) ?
+    alloc = ((pSrc->flags & CM_AllAllocated) && CLIENT_ID(midSrc) == client) ?
         AllocAll : AllocNone;
     size = pVisual->ColormapEntries;
 
@@ -564,7 +564,7 @@ CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client)
             memmove((char *) pmap->blue, (char *) pSrc->blue,
                     size * sizeof(Entry));
         }
-        pSrc->flags &= ~AllAllocated;
+        pSrc->flags &= ~CM_AllAllocated;
         FreePixels(pSrc, client);
         doUpdateColors(pmap);
         return Success;
@@ -810,7 +810,7 @@ FindColor(ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb * prgb,
             /* If we're initializing the colormap, then we are looking for
              * the first free cell we can find, not to minimize the number
              * of entries we use.  So don't look any further. */
-            if (pmap->flags & BeingCreated)
+            if (pmap->flags & CM_BeingCreated)
                 break;
         }
         pixel++;
@@ -883,7 +883,7 @@ FindColor(ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb * prgb,
     *pPixel = def.pixel;
 
  gotit:
-    if (pmap->flags & BeingCreated || client == -1)
+    if (pmap->flags & CM_BeingCreated || client == -1)
         return Success;
     /* Now remember the pixel, for freeing later */
     switch (channel) {
@@ -957,7 +957,7 @@ AllocColor(ColormapPtr pmap,
      * the colormap, even if it's a static type. Otherwise, we'd never be
      * able to initialize static colormaps
      */
-    if (pmap->flags & BeingCreated)
+    if (pmap->flags & CM_BeingCreated)
         class |= DynamicClass;
 
     /* If this is one of the static storage classes, and we're not initializing
@@ -1088,7 +1088,7 @@ AllocColor(ColormapPtr pmap,
      * resource manager that the client has pixels in this colormap which
      * should be freed when the client dies */
     if ((pmap->numPixelsRed[client] == 1) &&
-        (CLIENT_ID(pmap->mid) != client) && !(pmap->flags & BeingCreated)) {
+        (CLIENT_ID(pmap->mid) != client) && !(pmap->flags & CM_BeingCreated)) {
         colorResource *pcr;
 
         pcr = malloc(sizeof(colorResource));
@@ -2078,7 +2078,7 @@ FreeColors(ColormapPtr pmap, int client, int count, Pixel * pixels, Pixel mask)
     Pixel rmask;
 
     class = pmap->class;
-    if (pmap->flags & AllAllocated)
+    if (pmap->flags & CM_AllAllocated)
         return BadAccess;
     if ((class | DynamicClass) == DirectColor) {
         rmask = mask & RGBMASK(pmap->pVisual);
@@ -2260,7 +2260,7 @@ StoreColors(ColormapPtr pmap, int count, xColorItem * defs, ClientPtr client)
     int ok;
 
     class = pmap->class;
-    if (!(class & DynamicClass) && !(pmap->flags & BeingCreated)) {
+    if (!(class & DynamicClass) && !(pmap->flags & CM_BeingCreated)) {
         return BadAccess;
     }
     pVisual = pmap->pVisual;
diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 90ec1600f..04a55b07a 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -13,6 +13,12 @@
 #include "include/dix.h"
 #include "include/window.h"
 
+/* Values for the flags field of a colormap. These should have 1 bit set
+ * and not overlap */
+#define CM_IsDefault 1
+#define CM_AllAllocated 2
+#define CM_BeingCreated 4
+
 typedef struct _CMEntry *EntryPtr;
 
 int CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
diff --git a/dix/dispatch.c b/dix/dispatch.c
index eea2bc105..f41d3704d 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -2481,7 +2481,7 @@ ProcFreeColormap(ClientPtr client)
                                  client, DixDestroyAccess);
     if (rc == Success) {
         /* Freeing a default colormap is a no-op */
-        if (!(pmap->flags & IsDefault))
+        if (!(pmap->flags & CM_IsDefault))
             FreeResource(stuff->id, X11_RESTYPE_NONE);
         return Success;
     }
@@ -2827,7 +2827,7 @@ ProcFreeColors(ClientPtr client)
     if (rc == Success) {
         int count;
 
-        if (pcmp->flags & AllAllocated)
+        if (pcmp->flags & CM_AllAllocated)
             return BadAccess;
         count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq));
         return FreeColors(pcmp, client->index, count,
diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml
index fdbb84170..7736cb292 100644
--- a/doc/Xserver-spec.xml
+++ b/doc/Xserver-spec.xml
@@ -2736,7 +2736,7 @@ If the colormap is static, which you can tell by looking at the class field,
 you will want to fill in each color cell to match the hardwares notion of the
 color for that pixel.
 If the colormap is the default for the screen, which you can tell by looking
-at the IsDefault bit in the flags field, you should allocate BlackPixel
+at the CM_IsDefault bit in the flags field, you should allocate BlackPixel
 and WhitePixel to match the values you set in the pScreen structure.
 (Of course, you picked those values to begin with.)</para>
 <para>
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 2884134b4..38ce01f08 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -36,6 +36,8 @@
 #endif
 #include "win.h"
 
+#include "dix/colormap_priv.h"
+
 #define FAIL_MSG_MAX_BLT	10
 
 /*
@@ -1135,7 +1137,7 @@ winDestroyColormapShadowDDNL(ColormapPtr pColormap)
      * will not have had winUninstallColormap called on it.  Thus,
      * we need to handle the default colormap in a special way.
      */
-    if (pColormap->flags & IsDefault) {
+    if (pColormap->flags & CM_IsDefault) {
 #if ENABLE_DEBUG
         winDebug
             ("winDestroyColormapShadowDDNL - Destroying default colormap\n");
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 560b50cf9..f8317ad27 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -33,6 +33,8 @@
 #endif
 #include "win.h"
 
+#include "dix/colormap_priv.h"
+
 /*
  * Local function prototypes
  */
@@ -1209,7 +1211,7 @@ winDestroyColormapShadowGDI(ColormapPtr pColormap)
      * will not have had winUninstallColormap called on it.  Thus,
      * we need to handle the default colormap in a special way.
      */
-    if (pColormap->flags & IsDefault) {
+    if (pColormap->flags & CM_IsDefault) {
 #if ENABLE_DEBUG
         winDebug("winDestroyColormapShadowGDI - Destroying default "
                  "colormap\n");
diff --git a/include/colormap.h b/include/colormap.h
index 016c76d63..216a4c932 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -53,12 +53,6 @@ SOFTWARE.
 
 #define DynamicClass  1
 
-/* Values for the flags field of a colormap. These should have 1 bit set
- * and not overlap */
-#define IsDefault 1
-#define AllAllocated 2
-#define BeingCreated 4
-
 typedef CARD32 Pixel;
 
 extern _X_EXPORT Bool ResizeVisualArray(ScreenPtr /* pScreen */ ,
diff --git a/include/colormapst.h b/include/colormapst.h
index 53b61cb22..78545f90d 100644
--- a/include/colormapst.h
+++ b/include/colormapst.h
@@ -91,8 +91,8 @@ typedef struct _ColormapRec {
     short class;                /* PseudoColor or DirectColor */
     XID mid;                    /* client's name for colormap */
     ScreenPtr pScreen;          /* screen map is associated with */
-    short flags;                /* 1 = IsDefault
-                                 * 2 = AllAllocated */
+    short flags;                /* 1 = CM_IsDefault
+                                 * 2 = CM_AllAllocated */
     int freeRed;
     int freeGreen;
     int freeBlue;
commit 7ba3fc3a541c0190ba21cd1f3983ed2e45e686cd
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:44:08 2024 +0200

    dix: move internal defines into colormap.c
    
    These are really internal to colormap.c, so move them there.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap.c b/dix/colormap.c
index 77b80d0e9..193f286bd 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -68,6 +68,14 @@ SOFTWARE.
 #include "privates.h"
 #include "xace.h"
 
+#define REDMAP 0
+#define GREENMAP 1
+#define BLUEMAP 2
+#define PSEUDOMAP 3
+
+#define AllocPrivate (-1)
+#define AllocTemporary (-2)
+
 typedef int (*ColorCompareProcPtr) (EntryPtr /*pent */ ,
                                     xrgb * /*prgb */ );
 
diff --git a/include/colormap.h b/include/colormap.h
index cfeed9020..016c76d63 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -51,13 +51,6 @@ SOFTWARE.
 #include "screenint.h"
 #include "window.h"
 
-/* Passed internally in colormap.c */
-#define REDMAP 0
-#define GREENMAP 1
-#define BLUEMAP 2
-#define PSEUDOMAP 3
-#define AllocPrivate (-1)
-#define AllocTemporary (-2)
 #define DynamicClass  1
 
 /* Values for the flags field of a colormap. These should have 1 bit set
commit cbf5d88352a192af865d312a2e2ed024f4575226
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:41:20 2024 +0200

    include: colormap.h: drop unused defines
    
    These aren't used anywhere, so we can drop them.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/include/colormap.h b/include/colormap.h
index 15f11de69..cfeed9020 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -51,9 +51,6 @@ SOFTWARE.
 #include "screenint.h"
 #include "window.h"
 
-/* these follow X.h's AllocNone and AllocAll */
-#define CM_PSCREEN 2
-#define CM_PWIN	   3
 /* Passed internally in colormap.c */
 #define REDMAP 0
 #define GREENMAP 1
commit 7c03549134c9542984607fb0ba3ae905cc682779
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:35:33 2024 +0200

    include: colormap.h: drop unused typedef colorResourcePtr
    
    This typedef isn't used anywhere, so can be dropped.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/include/colormap.h b/include/colormap.h
index 96321b452..15f11de69 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -71,9 +71,6 @@ SOFTWARE.
 
 typedef CARD32 Pixel;
 
-/* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
-typedef struct _colorResource *colorResourcePtr;
-
 extern _X_EXPORT Bool ResizeVisualArray(ScreenPtr /* pScreen */ ,
                                         int /* new_vis_count */ ,
                                         DepthPtr /* depth */ );
commit a3ec1a829dd1e396ef2f2fad4472d35c323e9779
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:29:58 2024 +0200

    dix: unexport IsMapInstalled()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/Xext/saver.c b/Xext/saver.c
index 70edf5d2d..0802551ea 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -35,6 +35,7 @@ in this Software without prior written authorization from the X Consortium.
 #include <X11/Xproto.h>
 #include <X11/extensions/saverproto.h>
 
+#include "dix/colormap_priv.h"
 #include "dix/dix_priv.h"
 #include "os/screensaver.h"
 
diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 2aacd6b6f..90ec1600f 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -51,4 +51,6 @@ int FreeColors(ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mas
 
 int StoreColors(ColormapPtr pmap, int count, xColorItem * defs, ClientPtr client);
 
+int IsMapInstalled(Colormap map, WindowPtr pWin);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/dix/window.c b/dix/window.c
index c091796b9..1bb9cb090 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -100,6 +100,7 @@ Equipment Corporation.
 #include <dix-config.h>
 #endif
 
+#include "dix/colormap_priv.h"
 #include "dix/dix_priv.h"
 #include "dix/exevents_priv.h"
 #include "dix/input_priv.h"
diff --git a/include/colormap.h b/include/colormap.h
index 1cf601ec1..96321b452 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,9 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int IsMapInstalled(Colormap /*map */ ,
-                                    WindowPtr /*pWin */ );
-
 extern _X_EXPORT Bool ResizeVisualArray(ScreenPtr /* pScreen */ ,
                                         int /* new_vis_count */ ,
                                         DepthPtr /* depth */ );
commit 5eca51a5d2063d090c27e5a734222f8c572da12f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:24:07 2024 +0200

    dix: unexport StoreColors()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 73b58b5e4..2aacd6b6f 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -49,4 +49,6 @@ int AllocColorPlanes(int client, ColormapPtr pmap, int colors, int r, int g,
 
 int FreeColors(ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask);
 
+int StoreColors(ColormapPtr pmap, int count, xColorItem * defs, ClientPtr client);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index 33b40a1d7..1cf601ec1 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,11 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int StoreColors(ColormapPtr /*pmap */ ,
-                                 int /*count */ ,
-                                 xColorItem * /*defs */ ,
-                                 ClientPtr client);
-
 extern _X_EXPORT int IsMapInstalled(Colormap /*map */ ,
                                     WindowPtr /*pWin */ );
 
diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c
index 79fe3507b..5d9c3e597 100644
--- a/miext/rootless/rootlessScreen.c
+++ b/miext/rootless/rootlessScreen.c
@@ -33,6 +33,13 @@
 #include <dix-config.h>
 #endif
 
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+
+#include "dix/colormap_priv.h"
+
 #include "mi.h"
 #include "scrnintstr.h"
 #include "gcstruct.h"
@@ -43,11 +50,6 @@
 #include "picturestr.h"
 #include "colormapst.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-
 #include "rootlessCommon.h"
 #include "rootlessWindow.h"
 
commit 6809621985349e38e19f4846853f7d70d2d21254
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:18:59 2024 +0200

    dix: unexport FreeColors()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 27a19bc4f..73b58b5e4 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -47,4 +47,6 @@ int AllocColorPlanes(int client, ColormapPtr pmap, int colors, int r, int g,
                      int b, Bool contig, Pixel *pixels, Pixel *prmask,
                      Pixel *pgmask, Pixel *pbmask);
 
+int FreeColors(ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index ebe37d31e..33b40a1d7 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,12 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int FreeColors(ColormapPtr /*pmap */ ,
-                                int /*client */ ,
-                                int /*count */ ,
-                                Pixel * /*pixels */ ,
-                                Pixel /*mask */ );
-
 extern _X_EXPORT int StoreColors(ColormapPtr /*pmap */ ,
                                  int /*count */ ,
                                  xColorItem * /*defs */ ,
commit c2e49c82be6c3a3872613c38abb7c9e4bbcba132
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:14:01 2024 +0200

    dix: unexport AllocColorPlanes()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 0299521bd..27a19bc4f 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -43,4 +43,8 @@ int FreeClientPixels(void *pcr, XID fakeid);
 int AllocColorCells(int client, ColormapPtr pmap, int colors, int planes,
                     Bool contig, Pixel *ppix, Pixel *masks);
 
+int AllocColorPlanes(int client, ColormapPtr pmap, int colors, int r, int g,
+                     int b, Bool contig, Pixel *pixels, Pixel *prmask,
+                     Pixel *pgmask, Pixel *pbmask);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index 256894eae..ebe37d31e 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,18 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int AllocColorPlanes(int /*client */ ,
-                                      ColormapPtr /*pmap */ ,
-                                      int /*colors */ ,
-                                      int /*r */ ,
-                                      int /*g */ ,
-                                      int /*b */ ,
-                                      Bool /*contig */ ,
-                                      Pixel * /*pixels */ ,
-                                      Pixel * /*prmask */ ,
-                                      Pixel * /*pgmask */ ,
-                                      Pixel * /*pbmask */ );
-
 extern _X_EXPORT int FreeColors(ColormapPtr /*pmap */ ,
                                 int /*client */ ,
                                 int /*count */ ,
commit b7e280e16347d9e06ddf024a413d650eb02b6343
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:09:12 2024 +0200

    dix: unexport AllocColorCells()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 9112976b3..0299521bd 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -40,4 +40,7 @@ int QueryColors(ColormapPtr pmap, int count, Pixel *ppixIn,
 /* should only be called via resource type's destructor */
 int FreeClientPixels(void *pcr, XID fakeid);
 
+int AllocColorCells(int client, ColormapPtr pmap, int colors, int planes,
+                    Bool contig, Pixel *ppix, Pixel *masks);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index 4433c2c0e..256894eae 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,14 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int AllocColorCells(int /*client */ ,
-                                     ColormapPtr /*pmap */ ,
-                                     int /*colors */ ,
-                                     int /*planes */ ,
-                                     Bool /*contig */ ,
-                                     Pixel * /*ppix */ ,
-                                     Pixel * /*masks */ );
-
 extern _X_EXPORT int AllocColorPlanes(int /*client */ ,
                                       ColormapPtr /*pmap */ ,
                                       int /*colors */ ,
commit 3964510fb800fd30f5ad508d6b684ebc03755cc5
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 12:01:54 2024 +0200

    dix: unexport FreeClientPixels()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 6af6d17d2..9112976b3 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -37,4 +37,7 @@ void FakeFreeColor(ColormapPtr pmap, Pixel pixel);
 int QueryColors(ColormapPtr pmap, int count, Pixel *ppixIn,
                 xrgb *prgbList, ClientPtr client);
 
+/* should only be called via resource type's destructor */
+int FreeClientPixels(void *pcr, XID fakeid);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index 9368b356d..4433c2c0e 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,9 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int FreeClientPixels(void *pcr,
-                                      XID fakeid);
-
 extern _X_EXPORT int AllocColorCells(int /*client */ ,
                                      ColormapPtr /*pmap */ ,
                                      int /*colors */ ,
commit 5dc5d2965b4df77384d82fb96005a9ed9cdb93f0
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:58:21 2024 +0200

    dix: unexport QueryColors()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 08771759b..6af6d17d2 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -10,6 +10,7 @@
 
 #include "dix/screenint_priv.h"
 #include "include/colormap.h"
+#include "include/dix.h"
 #include "include/window.h"
 
 typedef struct _CMEntry *EntryPtr;
@@ -33,4 +34,7 @@ void FakeAllocColor(ColormapPtr pmap, xColorItem *item);
 
 void FakeFreeColor(ColormapPtr pmap, Pixel pixel);
 
+int QueryColors(ColormapPtr pmap, int count, Pixel *ppixIn,
+                xrgb *prgbList, ClientPtr client);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index c82295eb8..4ebd8b058 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -38,6 +38,7 @@ from The Open Group.
 #include <X11/Xproto.h>
 #include <X11/Xos.h>
 
+#include "dix/colormap_priv.h"
 #include "dix/dix_priv.h"
 #include "dix/screenint_priv.h"
 #include "os/cmdline.h"
diff --git a/include/colormap.h b/include/colormap.h
index 4c21475ca..9368b356d 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,12 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int QueryColors(ColormapPtr /*pmap */ ,
-                                 int /*count */ ,
-                                 Pixel * /*ppixIn */ ,
-                                 xrgb * /*prgbList */ ,
-                                 ClientPtr client);
-
 extern _X_EXPORT int FreeClientPixels(void *pcr,
                                       XID fakeid);
 
commit 968cb9c7fae1d667936f48bde78f3f0e87b37345
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:52:05 2024 +0200

    dix: unexport FakeFreeColor()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index c348b0408..08771759b 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -31,4 +31,6 @@ int AllocColor(ColormapPtr pmap, unsigned short *pred, unsigned short *pgreen,
 
 void FakeAllocColor(ColormapPtr pmap, xColorItem *item);
 
+void FakeFreeColor(ColormapPtr pmap, Pixel pixel);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index 14cec9b91..4c21475ca 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,9 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT void FakeFreeColor(ColormapPtr /*pmap */ ,
-                                    Pixel /*pixel */ );
-
 extern _X_EXPORT int QueryColors(ColormapPtr /*pmap */ ,
                                  int /*count */ ,
                                  Pixel * /*ppixIn */ ,
commit 989c46fc9d2c22b340ae14988f775f380e3e3755
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:38:58 2024 +0200

    dix: unexport FakeAllocColor()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 6e7dff8aa..c348b0408 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -6,6 +6,7 @@
 #define _XSERVER_DIX_COLORMAP_PRIV_H
 
 #include <X11/Xdefs.h>
+#include <X11/Xproto.h>
 
 #include "dix/screenint_priv.h"
 #include "include/colormap.h"
@@ -28,4 +29,6 @@ int CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client);
 int AllocColor(ColormapPtr pmap, unsigned short *pred, unsigned short *pgreen,
                unsigned short *pblue, Pixel *pPix, int client );
 
+void FakeAllocColor(ColormapPtr pmap, xColorItem *item);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
index eba503d51..4ccd55eaa 100644
--- a/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
@@ -4,12 +4,13 @@
 #endif
 
 #include <string.h>
+#include <X11/X.h>
+
+#include "dix/colormap_priv.h"
 
 #include "misc.h"
 #include "xf86.h"
 #include "xf86_OSproc.h"
-
-#include <X11/X.h>
 #include "scrnintstr.h"
 #include "pixmapstr.h"
 #include "windowstr.h"
@@ -19,7 +20,6 @@
 #include "mipointer.h"
 #include "randrstr.h"
 #include "xf86CursorPriv.h"
-
 #include "servermd.h"
 
 static void
diff --git a/include/colormap.h b/include/colormap.h
index 5279998f8..14cec9b91 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,9 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT void FakeAllocColor(ColormapPtr /*pmap */ ,
-                                     xColorItem * /*item */ );
-
 extern _X_EXPORT void FakeFreeColor(ColormapPtr /*pmap */ ,
                                     Pixel /*pixel */ );
 
diff --git a/mi/misprite.c b/mi/misprite.c
index e0af13ad9..87e6fbe8e 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -35,7 +35,10 @@ in this Software without prior written authorization from The Open Group.
 
 #include   <X11/X.h>
 #include   <X11/Xproto.h>
+#include   <X11/fonts/font.h>
+#include   <X11/fonts/fontstruct.h>
 
+#include   "dix/colormap_priv.h"
 #include   "dix/dix_priv.h"
 
 #include   "misc.h"
@@ -43,7 +46,6 @@ in this Software without prior written authorization from The Open Group.
 #include   "input.h"
 #include   "mi.h"
 #include   "cursorstr.h"
-#include   <X11/fonts/font.h>
 #include   "scrnintstr.h"
 #include   "colormapst.h"
 #include   "windowstr.h"
@@ -51,7 +53,6 @@ in this Software without prior written authorization from The Open Group.
 #include   "mipointer.h"
 #include   "misprite.h"
 #include   "dixfontstr.h"
-#include   <X11/fonts/fontstruct.h>
 #include   "inputstr.h"
 #include   "damage.h"
 
commit b48e4a9cb71c0857d296956c420d50a1330c93e9
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:34:23 2024 +0200

    dix: unexport AllocColor()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index c5ea51f3d..6e7dff8aa 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -25,4 +25,7 @@ int TellGainedMap(WindowPtr pwin, void *value);
 
 int CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client);
 
+int AllocColor(ColormapPtr pmap, unsigned short *pred, unsigned short *pgreen,
+               unsigned short *pblue, Pixel *pPix, int client );
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/fb/fbcmap_mi.c b/fb/fbcmap_mi.c
index a71828a11..6c826dcab 100644
--- a/fb/fbcmap_mi.c
+++ b/fb/fbcmap_mi.c
@@ -32,6 +32,9 @@
 #endif
 
 #include <X11/X.h>
+
+#include "dix/colormap_priv.h"
+
 #include "fb.h"
 #include "micmap.h"
 
diff --git a/include/colormap.h b/include/colormap.h
index c24b54b12..5279998f8 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,13 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int AllocColor(ColormapPtr /*pmap */ ,
-                                unsigned short * /*pred */ ,
-                                unsigned short * /*pgreen */ ,
-                                unsigned short * /*pblue */ ,
-                                Pixel * /*pPix */ ,
-                                int /*client */ );
-
 extern _X_EXPORT void FakeAllocColor(ColormapPtr /*pmap */ ,
                                      xColorItem * /*item */ );
 
diff --git a/render/miindex.c b/render/miindex.c
index 4119eef66..7892b66ff 100644
--- a/render/miindex.c
+++ b/render/miindex.c
@@ -28,6 +28,8 @@
 #ifndef _MIINDEX_H_
 #define _MIINDEX_H_
 
+#include "dix/colormap_priv.h"
+
 #include "scrnintstr.h"
 #include "gcstruct.h"
 #include "pixmapstr.h"
commit 3874fced3171723fda32d85354fc253d4a3918d2
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:29:06 2024 +0200

    dix: unexport CopyColormapAndFree()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 0a7fba115..c5ea51f3d 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -23,4 +23,6 @@ int TellLostMap(WindowPtr pwin, void *value);
 
 int TellGainedMap(WindowPtr pwin, void *value);
 
+int CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index 942586122..c24b54b12 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,10 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int CopyColormapAndFree(Colormap /*mid */ ,
-                                         ColormapPtr /*pSrc */ ,
-                                         int /*client */ );
-
 extern _X_EXPORT int AllocColor(ColormapPtr /*pmap */ ,
                                 unsigned short * /*pred */ ,
                                 unsigned short * /*pgreen */ ,
commit de4db967e0fd7c64cb5c736b76ec719eb2479efb
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:23:06 2024 +0200

    dix: unexport TellGainedMap()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 0a84c4d92..0a7fba115 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -21,4 +21,6 @@ int FreeColormap(void *pmap, XID mid);
 
 int TellLostMap(WindowPtr pwin, void *value);
 
+int TellGainedMap(WindowPtr pwin, void *value);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/include/colormap.h b/include/colormap.h
index f91218291..942586122 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,9 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int TellGainedMap(WindowPtr pwin,
-                                   void *value);
-
 extern _X_EXPORT int CopyColormapAndFree(Colormap /*mid */ ,
                                          ColormapPtr /*pSrc */ ,
                                          int /*client */ );
commit ece72f50fe55381dbfc2d3c8d64721fe197b272a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:17:27 2024 +0200

    dix: unexport TellLostMap()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 3bcb889b6..0a84c4d92 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -9,6 +9,7 @@
 
 #include "dix/screenint_priv.h"
 #include "include/colormap.h"
+#include "include/window.h"
 
 typedef struct _CMEntry *EntryPtr;
 
@@ -18,4 +19,6 @@ int CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
 /* should only be called via resource type's destructor */
 int FreeColormap(void *pmap, XID mid);
 
+int TellLostMap(WindowPtr pwin, void *value);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/hw/kdrive/src/kcmap.c b/hw/kdrive/src/kcmap.c
index 2e65bdde4..2a8020f0e 100644
--- a/hw/kdrive/src/kcmap.c
+++ b/hw/kdrive/src/kcmap.c
@@ -25,6 +25,8 @@
 #endif
 #include "kdrive.h"
 
+#include "dix/colormap_priv.h"
+
 /*
  * Put the entire colormap into the DAC
  */
diff --git a/include/colormap.h b/include/colormap.h
index dc558a23e..f91218291 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,9 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int TellLostMap(WindowPtr pwin,
-                                 void *value);
-
 extern _X_EXPORT int TellGainedMap(WindowPtr pwin,
                                    void *value);
 
commit a1902f2029b8244f177b2c54ea68f2545ded394f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 11:03:35 2024 +0200

    dix: unexport FreeColormap()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index 55054ea0f..3bcb889b6 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -5,6 +5,8 @@
 #ifndef _XSERVER_DIX_COLORMAP_PRIV_H
 #define _XSERVER_DIX_COLORMAP_PRIV_H
 
+#include <X11/Xdefs.h>
+
 #include "dix/screenint_priv.h"
 #include "include/colormap.h"
 
@@ -13,4 +15,7 @@ typedef struct _CMEntry *EntryPtr;
 int CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
                    ColormapPtr *ppcmap, int alloc, int client);
 
+/* should only be called via resource type's destructor */
+int FreeColormap(void *pmap, XID mid);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/dix/resource.c b/dix/resource.c
index 87936886b..356483bac 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -123,6 +123,7 @@ Equipment Corporation.
 
 #include <X11/X.h>
 
+#include "dix/colormap_priv.h"
 #include "dix/gc_priv.h"
 #include "dix/registry_priv.h"
 #include "os/osdep.h"
diff --git a/include/colormap.h b/include/colormap.h
index a63d31a57..dc558a23e 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,9 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int FreeColormap(void *pmap,
-                                  XID mid);
-
 extern _X_EXPORT int TellLostMap(WindowPtr pwin,
                                  void *value);
 
commit 7ce67a99bc0fb5f43649d414803d305666632d4e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Jun 28 10:49:14 2024 +0200

    dix: unexport CreateColormap()
    
    Not used by any driver/module, so no need to keep it exported.
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>

diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h
index dbdffb8d0..55054ea0f 100644
--- a/dix/colormap_priv.h
+++ b/dix/colormap_priv.h
@@ -5,6 +5,12 @@
 #ifndef _XSERVER_DIX_COLORMAP_PRIV_H
 #define _XSERVER_DIX_COLORMAP_PRIV_H
 
+#include "dix/screenint_priv.h"
+#include "include/colormap.h"
+
 typedef struct _CMEntry *EntryPtr;
 
+int CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
+                   ColormapPtr *ppcmap, int alloc, int client);
+
 #endif /* _XSERVER_DIX_COLORMAP_PRIV_H */
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 0e79f9956..eea2bc105 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -105,6 +105,7 @@ Equipment Corporation.
 #include <X11/fonts/fontstruct.h>
 #include <X11/fonts/libxfont2.h>
 
+#include "dix/colormap_priv.h"
 #include "dix/dix_priv.h"
 #include "dix/input_priv.h"
 #include "dix/gc_priv.h"
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 614c35ae4..3ce1f1259 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -46,6 +46,7 @@
 #include <X11/Xproto.h>
 #include <X11/extensions/xf86dgaproto.h>
 
+#include "dix/colormap_priv.h"
 #include "dix/dix_priv.h"
 #include "dix/eventconvert.h"
 #include "dix/exevents_priv.h"
diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c
index 06b384539..37c960141 100644
--- a/hw/xnest/Color.c
+++ b/hw/xnest/Color.c
@@ -20,6 +20,8 @@ is" without express or implied warranty.
 #include <X11/Xdefs.h>
 #include <X11/Xproto.h>
 
+#include "dix/colormap_priv.h"
+
 #include "scrnintstr.h"
 #include "window.h"
 #include "windowstr.h"
diff --git a/hw/xwin/wincmap.c b/hw/xwin/wincmap.c
index df69ba78b..3567afad5 100644
--- a/hw/xwin/wincmap.c
+++ b/hw/xwin/wincmap.c
@@ -36,6 +36,8 @@
 #endif
 #include "win.h"
 
+#include "dix/colormap_priv.h"
+
 /*
  * Local prototypes
  */
diff --git a/include/colormap.h b/include/colormap.h
index dabfbd92c..a63d31a57 100644
--- a/include/colormap.h
+++ b/include/colormap.h
@@ -74,13 +74,6 @@ typedef CARD32 Pixel;
 /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */
 typedef struct _colorResource *colorResourcePtr;
 
-extern _X_EXPORT int CreateColormap(Colormap /*mid */ ,
-                                    ScreenPtr /*pScreen */ ,
-                                    VisualPtr /*pVisual */ ,
-                                    ColormapPtr * /*ppcmap */ ,
-                                    int /*alloc */ ,
-                                    int /*client */ );
-
 extern _X_EXPORT int FreeColormap(void *pmap,
                                   XID mid);
 
diff --git a/mi/micmap.c b/mi/micmap.c
index d42a1cc51..2c312845d 100644
--- a/mi/micmap.c
+++ b/mi/micmap.c
@@ -33,6 +33,9 @@
 
 #include <X11/X.h>
 #include <X11/Xproto.h>
+
+#include "dix/colormap_priv.h"
+
 #include "scrnintstr.h"
 #include "colormapst.h"
 #include "resource.h"
diff --git a/render/picture.c b/render/picture.c
index 3c0da91cd..d41a0ed91 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -26,6 +26,8 @@
 #include <dix-config.h>
 #endif
 
+#include "dix/colormap_priv.h"
+
 #include "misc.h"
 #include "scrnintstr.h"
 #include "os.h"


More information about the xorg-commit mailing list