From 5752cc473648bf73f9ca71b7ccffc03b23e9195b Mon Sep 17 00:00:00 2001 From: Marko Macek Date: Sat, 21 May 2011 13:30:59 +0100 Subject: 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 Reviewed-by: Walter Harms Reviewed-by: Daniel Stone Signed-off-by: Keith Packard (cherry picked from commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a) --- dix/window.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/window.c b/dix/window.c index 9be70649a..41306b3eb 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 -- cgit v1.2.3