Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 9feba1e0d7d5f86af48201258579e13f > files > 2

x11-server-xgl-0.0.1-0.20070917.2mdv2008.0.src.rpm

From 3f201796284112ed2c43d8d67a8d676bc7ca6d43 Mon Sep 17 00:00:00 2001
From: Boiko <boiko@ageless.conectiva>
Date: Thu, 8 Jun 2006 14:07:35 -0300
Subject: [PATCH] Blue background on startup
---
 dix/window.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

--- xgl/cfb/cfbwindow.c.blue_bg	2006-07-14 12:58:13.000000000 -0400
+++ xgl/cfb/cfbwindow.c	2007-03-02 10:50:33.000000000 -0500
@@ -254,7 +254,8 @@
 	switch(index)
 	{
 	case CWBackPixmap:
-	    if (pWin->backgroundState == None)
+	    if (pWin->backgroundState == None ||
+		pWin->backgroundState == BackgroundPixel)
 	    {
 		pPrivWin->fastBackground = FALSE;
 	    }
--- xgl/dix/window.c.blue_bg	2006-07-14 12:58:13.000000000 -0400
+++ xgl/dix/window.c	2007-03-02 14:43:37.000000000 -0500
@@ -314,6 +314,7 @@
 static void
 MakeRootTile(WindowPtr pWin)
 {
+#if 0
     ScreenPtr pScreen = pWin->drawable.pScreen;
     GCPtr pGC;
     unsigned char back[128];
@@ -355,6 +356,21 @@
 
    FreeScratchGC(pGC);
 
+#else
+   {
+     /* Mandrake Linux specific: set our background color */
+     unsigned short 	red = 0x00 << 8, green = 0x45 << 8, blue = 0x94 << 8;
+     Pixel		pixel;
+     
+     AllocColor((ColormapPtr)SecurityLookupIDByType(wClient(pWin), pWin->optional->colormap,
+					      RT_COLORMAP, SecurityWriteAccess),
+		&red, &green, &blue, &pixel, wClient(pWin)->index);
+     ChangeWindowAttributes(pWin, CWBackPixel, &pixel, wClient(pWin));
+     (*pWin->drawable.pScreen->ClearToBackground)(pWin, 0, 0, 0, 0, 0);
+     
+     /* ErrorF("xf86CreateRootWindow() put background color %d\n", pixel); */
+   }
+#endif
 }
 
 WindowPtr
@@ -519,7 +535,7 @@
     pWin->forcedBS = (defaultBackingStore != NotUseful);
     /* We SHOULD check for an error value here XXX */
     (*pScreen->ChangeWindowAttributes)(pWin,
-		       CWBackPixmap|CWBorderPixel|CWCursor|CWBackingStore);
+		       CWBackPixel|CWBorderPixel|CWCursor|CWBackingStore);
 
     MapWindow(pWin, serverClient);
 }