From 7bfb3fe4323f7cd380dd43ce7e5155e7e5e40d9e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 5 Aug 2024 21:29:16 +0200 Subject: [PATCH] Xnest: replace XStoreColors() by xcb_store_colors() Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/Color.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c index e36780c29..af88f32c6 100644 --- a/hw/xnest/Color.c +++ b/hw/xnest/Color.c @@ -390,27 +390,10 @@ void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors) { if (pCmap->pVisual->class & DynamicClass) -#ifdef _XSERVER64 - { - int i; - XColor *pColors64 = calloc(nColors, sizeof(XColor)); - if (!pColors64) - return; - - for (i = 0; i < nColors; ++i) { - pColors64[i].pixel = pColors[i].pixel; - pColors64[i].red = pColors[i].red; - pColors64[i].green = pColors[i].green; - pColors64[i].blue = pColors[i].blue; - pColors64[i].flags = pColors[i].flags; - } - XStoreColors(xnestDisplay, xnestColormap(pCmap), pColors64, nColors); - free(pColors64); - } -#else - XStoreColors(xnestDisplay, xnestColormap(pCmap), - (XColor *) pColors, nColors); -#endif + xcb_store_colors(xnestUpstreamInfo.conn, + xnestColormap(pCmap), + nColors, + (xcb_coloritem_t*) pColors); } void