--- xcompmgr.c.orig	2009-09-19 19:45:12.000000000 +0200
+++ xcompmgr.c	2009-09-19 19:54:07.000000000 +0200
@@ -760,6 +760,8 @@
     NULL,
 };
     
+static XRenderColor RootFill = {.red = 0x8080, .green = 0x8080, .blue = 0x8080, .alpha = 0xffff};
+
 static Picture
 root_tile (Display *dpy)
 {
@@ -800,12 +802,7 @@
 				    CPRepeat, &pa);
     if (fill)
     {
-	XRenderColor    c;
-	
-	c.red = c.green = c.blue = 0x8080;
-	c.alpha = 0xffff;
-	XRenderFillRectangle (dpy, PictOpSrc, picture, &c, 
-			      0, 0, 1, 1);
+	XRenderFillRectangle (dpy, PictOpSrc, picture, &RootFill, 0, 0, 1, 1);
     }
     return picture;
 }
@@ -1865,6 +1862,7 @@
     fprintf (stderr, "   -I fade-in-step\n      Specifies the opacity change between steps while fading in. (default 0.028)\n");
     fprintf (stderr, "   -O fade-out-step\n      Specifies the opacity change between steps while fading out. (default 0.03)\n");
     fprintf (stderr, "   -D fade-delta-time\n      Specifies the time between steps in a fade in milliseconds. (default 10)\n");
+    fprintf (stderr, "   -b color\n      Specifies screen background fill color if no root window pixmap set. (default #808080)\n");
     fprintf (stderr, "   -a\n      Use automatic server-side compositing. Faster, but no special effects.\n");
     fprintf (stderr, "   -c\n      Draw client-side shadows with fuzzy edges.\n");
     fprintf (stderr, "   -C\n      Avoid drawing shadows on dock/panel windows.\n");
@@ -1944,8 +1942,9 @@
     int		    composite_major, composite_minor;
     char	    *display = NULL;
     int		    o;
+    char	    *rootfill = NULL;
 
-    while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:scnfFCaS")) != -1)
+    while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:b:scnfFCaS")) != -1)
     {
 	switch (o) {
 	case 'd':
@@ -2002,6 +2001,9 @@
 	case 't':
 	    shadowOffsetY = atoi (optarg);
 	    break;
+	case 'b':
+	    rootfill = optarg;
+	    break;
 	default:
 	    usage (argv[0]);
 	    break;
@@ -2065,6 +2067,16 @@
     winDialogAtom = XInternAtom (dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
     winNormalAtom = XInternAtom (dpy, "_NET_WM_WINDOW_TYPE_NORMAL", False);
 
+    if (rootfill != NULL)
+    {
+	XColor col, tmp;
+	if (XLookupColor (dpy, DefaultColormap (dpy, scr), rootfill, &col, &tmp)) {
+	    RootFill.red = col.red;
+	    RootFill.green = col.green;
+	    RootFill.blue = col.blue;
+	}
+    }
+
     pa.subwindow_mode = IncludeInferiors;
 
     if (compMode == CompClientShadows)
