[PATCH] Softcursor on Xglx

Tiago Vignatti tv02 at c3sl.ufpr.br
Mon Apr 3 13:19:22 PDT 2006


BUG: https://bugs.freedesktop.org/show_bug.cgi?id=6489

I don't know the right steps to send a patch, so I did a bugzilla entry and
post it here too. Is this right?

thanks in advance

T Vignatti

-- 
Tiago Vignatti
C3SL - Centro de Computação Científica e Software Livre
www.c3sl.ufpr.br
-------------- next part --------------
--- xgl-orig/xserver-xgl-7.0.0/hw/xgl/glx/xglx.c	2006-04-03 16:57:13.000000000 -0300
+++ xgl-modif/xserver-xgl-7.0.0/hw/xgl/glx/xglx.c	2006-04-03 16:57:59.000000000 -0300
@@ -551,6 +551,40 @@
     return TRUE;
 }
 
+Bool
+xglxCreateColormap(ScreenPtr pScreen)
+{
+    VisualPtr   pVisual;
+    ColormapPtr pCmap;
+    unsigned short zero = 0, ones = 0xFFFF;
+/*  Pixel wp, bp; */
+
+    for (pVisual = pScreen->visuals;
+      pVisual->vid != pScreen->rootVisual;
+      pVisual++);
+	if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &pCmap,
+                     (pVisual->class & DynamicClass) ? AllocNone : AllocAll,
+ 0)
+      != Success)
+	return False;
+
+
+/*  wp = pScreen->whitePixel;
+    bp = pScreen->blackPixel;
+    if ((AllocColor(pCmap, &ones, &ones, &ones, &wp, 0) !=
+         Success) ||
+        (AllocColor(pCmap, &zero, &zero, &zero, &bp, 0) !=
+         Success))
+      return FALSE;
+    pScreen->whitePixel = wp;
+    pScreen->blackPixel = bp;
+*/
+    (*pScreen->InstallColormap)(pCmap); /*  miSpriteInstallColormap(pCmap); */
+
+    return True;
+}
+
+
 static Bool
 xglxCloseScreen (int	   index,
 		 ScreenPtr pScreen)
@@ -794,6 +828,8 @@
 	XFreeColors (xdisplay, pScreenPriv->colormap, &black.pixel, 1, 0);
 
 	miDCInitialize (pScreen, &xglxPointerScreenFuncs);
+
+	if (!xglxCreateColormap(pScreen)) return FALSE;
     }
     else
     {


More information about the xorg mailing list