open-src/xserver/xorg/7050250.patch
changeset 1140 d4fde4ea232f
equal deleted inserted replaced
1139:5625f8498d99 1140:d4fde4ea232f
       
     1 From 5752cc473648bf73f9ca71b7ccffc03b23e9195b Mon Sep 17 00:00:00 2001
       
     2 From: Marko Macek <[email protected]>
       
     3 Date: Sat, 21 May 2011 13:30:59 +0100
       
     4 Subject: [PATCH 1/2] DIX: Set backgroundState correctly for root window
       
     5 
       
     6 When we change the root window's background to None, and we've run with
       
     7 -wr or -br for a forced solid background, make sure we also change the
       
     8 background state to BackgroundPixel, so we don't try to lookup either
       
     9 pScreen->whitePixel or pScreen->blackPixel as a pixmap.
       
    10 
       
    11 Signed-off-by: Marko Macek <[email protected]>
       
    12 Reviewed-by: Walter Harms <[email protected]>
       
    13 Reviewed-by: Daniel Stone <[email protected]>
       
    14 Signed-off-by: Keith Packard <[email protected]>
       
    15 (cherry picked from commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a)
       
    16 ---
       
    17  dix/window.c |    2 ++
       
    18  1 files changed, 2 insertions(+), 0 deletions(-)
       
    19 
       
    20 diff --git a/dix/window.c b/dix/window.c
       
    21 index 9be7064..41306b3 100644
       
    22 --- a/dix/window.c
       
    23 +++ b/dix/window.c
       
    24 @@ -474,6 +474,7 @@ InitRootWindow(WindowPtr pWin)
       
    25          pWin->background.pixel = pScreen->whitePixel;
       
    26          backFlag |= CWBackPixmap;
       
    27      } else {
       
    28 +        pWin->backgroundState = BackgroundPixel;
       
    29  	if (whiteRoot)
       
    30              pWin->background.pixel = pScreen->whitePixel;
       
    31          else
       
    32 @@ -972,6 +973,7 @@ SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2)
       
    33      else if (party_like_its_1989)
       
    34  	MakeRootTile(pWin);
       
    35      else {
       
    36 +        pWin->backgroundState = BackgroundPixel;
       
    37  	if (whiteRoot)
       
    38  	    pWin->background.pixel = pScreen->whitePixel;
       
    39  	else
       
    40 -- 
       
    41 1.7.3.2
       
    42