summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Macek <Marko.Macek@gmx.net>2011-05-21 13:30:59 +0100
committerJeremy Huddleston <jeremyhu@apple.com>2011-06-01 19:41:02 -0700
commit5752cc473648bf73f9ca71b7ccffc03b23e9195b (patch)
tree75cdf71adec122b97ce2436b425c013791e30d82
parent4bfb22e7667c4cd55da5e7a31af29ce5769ecc65 (diff)
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 <Marko.Macek@gmx.net> Reviewed-by: Walter Harms <wharms@bfs.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a)
-rw-r--r--dix/window.c2
1 files changed, 2 insertions, 0 deletions
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