summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-08-18 17:30:14 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-08-18 17:30:14 +0300
commit0704bb298cc826cd117815898c6bc015a693c2c9 (patch)
tree2f5b4782a97ed84e2b50efce4925997ab603789e
parentc14036977fef7b8787c0b68f5262fa0b6a2834f5 (diff)
parenta1ac0440bba690368aa4226468ce571be1a09d95 (diff)
Merge branch 'master' into input-hotplug
-rw-r--r--dix/globals.c1
-rw-r--r--dix/window.c21
-rw-r--r--include/opaque.h1
-rw-r--r--os/utils.c3
4 files changed, 20 insertions, 6 deletions
diff --git a/dix/globals.c b/dix/globals.c
index 5b854aabc..fc77ca793 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -143,6 +143,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
Bool loadableFonts = FALSE;
CursorPtr rootCursor;
Bool blackRoot=FALSE;
+Bool whiteRoot=FALSE;
ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */
_X_EXPORT TimeStamp currentTime;
diff --git a/dix/window.c b/dix/window.c
index ebc6923fa..0beeb3a4d 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -343,9 +343,6 @@ MakeRootTile(WindowPtr pWin)
for (j = len; j > 0; j--)
*to++ = *from;
- if (blackRoot)
- bzero(back, sizeof(back));
-
(*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1,
0, 0, len, 4, 0, XYBitmap, (char *)back);
@@ -506,6 +503,7 @@ void
InitRootWindow(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
+ int backFlag = CWBorderPixel | CWCursor | CWBackingStore;
if (!(*pScreen->CreateWindow)(pWin))
return; /* XXX */
@@ -514,12 +512,23 @@ InitRootWindow(WindowPtr pWin)
pWin->cursorIsNone = FALSE;
pWin->optional->cursor = rootCursor;
rootCursor->refcnt++;
- MakeRootTile(pWin);
+
+ if (!blackRoot && !whiteRoot) {
+ MakeRootTile(pWin);
+ backFlag |= CWBackPixmap;
+ }
+ else {
+ if (blackRoot)
+ pWin->background.pixel = pScreen->blackPixel;
+ else
+ pWin->background.pixel = pScreen->whitePixel;
+ backFlag |= CWBackPixel;
+ }
+
pWin->backingStore = defaultBackingStore;
pWin->forcedBS = (defaultBackingStore != NotUseful);
/* We SHOULD check for an error value here XXX */
- (*pScreen->ChangeWindowAttributes)(pWin,
- CWBackPixmap|CWBorderPixel|CWCursor|CWBackingStore);
+ (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
MapWindow(pWin, serverClient);
}
diff --git a/include/opaque.h b/include/opaque.h
index 4ccccd054..3d19d275f 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -73,6 +73,7 @@ extern int limitNoFile;
extern Bool defeatAccessControl;
extern long maxBigRequestSize;
extern Bool blackRoot;
+extern Bool whiteRoot;
extern Bool CoreDump;
diff --git a/os/utils.c b/os/utils.c
index 6bf862497..31ae26a18 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -642,6 +642,7 @@ void UseMsg(void)
ErrorF("v video blanking for screen-saver\n");
ErrorF("-v screen-saver without video blanking\n");
ErrorF("-wm WhenMapped default backing-store\n");
+ ErrorF("-wr create root window with white background\n");
ErrorF("-x string loads named extension at init time \n");
ErrorF("-maxbigreqsize set maximal bigrequest size \n");
#ifdef PANORAMIX
@@ -983,6 +984,8 @@ ProcessCommandLine(int argc, char *argv[])
defaultScreenSaverBlanking = DontPreferBlanking;
else if ( strcmp( argv[i], "-wm") == 0)
defaultBackingStore = WhenMapped;
+ else if ( strcmp( argv[i], "-wr") == 0)
+ whiteRoot = TRUE;
else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
if(++i < argc) {
long reqSizeArg = atol(argv[i]);