7050250 xsetroot crashes Xorg server
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Wed, 01 Jun 2011 22:54:28 -0700
changeset 1140 d4fde4ea232f
parent 1139 5625f8498d99
child 1141 e98284f37c98
7050250 xsetroot crashes Xorg server
open-src/xserver/xorg/7050250.patch
open-src/xserver/xorg/patch-list
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xorg/7050250.patch	Wed Jun 01 22:54:28 2011 -0700
@@ -0,0 +1,42 @@
+From 5752cc473648bf73f9ca71b7ccffc03b23e9195b Mon Sep 17 00:00:00 2001
+From: Marko Macek <[email protected]>
+Date: Sat, 21 May 2011 13:30:59 +0100
+Subject: [PATCH 1/2] DIX: Set backgroundState correctly for root window
+
+When we change the root window's background to None, and we've run with
+-wr or -br for a forced solid background, make sure we also change the
+background state to BackgroundPixel, so we don't try to lookup either
+pScreen->whitePixel or pScreen->blackPixel as a pixmap.
+
+Signed-off-by: Marko Macek <[email protected]>
+Reviewed-by: Walter Harms <[email protected]>
+Reviewed-by: Daniel Stone <[email protected]>
+Signed-off-by: Keith Packard <[email protected]>
+(cherry picked from commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a)
+---
+ dix/window.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/dix/window.c b/dix/window.c
+index 9be7064..41306b3 100644
+--- a/dix/window.c
++++ b/dix/window.c
+@@ -474,6 +474,7 @@ InitRootWindow(WindowPtr pWin)
+         pWin->background.pixel = pScreen->whitePixel;
+         backFlag |= CWBackPixmap;
+     } else {
++        pWin->backgroundState = BackgroundPixel;
+ 	if (whiteRoot)
+             pWin->background.pixel = pScreen->whitePixel;
+         else
+@@ -972,6 +973,7 @@ SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2)
+     else if (party_like_its_1989)
+ 	MakeRootTile(pWin);
+     else {
++        pWin->backgroundState = BackgroundPixel;
+ 	if (whiteRoot)
+ 	    pWin->background.pixel = pScreen->whitePixel;
+ 	else
+-- 
+1.7.3.2
+
--- a/open-src/xserver/xorg/patch-list	Wed Jun 01 16:55:00 2011 -0700
+++ b/open-src/xserver/xorg/patch-list	Wed Jun 01 22:54:28 2011 -0700
@@ -1,3 +1,4 @@
+7050250.patch,-p1
 oslog-race.patch,-p1
 sun-paths.patch,-p1
 sun-extramodes.patch,-p1