a7e275b068
- Add bg-none-root patch for plymouth.
94 lines
2.9 KiB
Diff
94 lines
2.9 KiB
Diff
From 85eb813132510f94bc973b6dd572d98b85fc3611 Mon Sep 17 00:00:00 2001
|
|
From: =?utf-8?q?Kristian=20H=C3=B8gsberg?= <krh@redhat.com>
|
|
Date: Fri, 13 Jun 2008 17:37:45 -0400
|
|
Subject: [PATCH] Add -nr (bg none root) option.
|
|
|
|
---
|
|
dix/globals.c | 1 +
|
|
dix/window.c | 15 +++++++++++----
|
|
include/opaque.h | 1 +
|
|
os/utils.c | 3 +++
|
|
4 files changed, 16 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/dix/globals.c b/dix/globals.c
|
|
index 210c784..19499af 100644
|
|
--- a/dix/globals.c
|
|
+++ b/dix/globals.c
|
|
@@ -141,6 +141,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
|
|
CursorPtr rootCursor;
|
|
Bool blackRoot=FALSE;
|
|
Bool whiteRoot=FALSE;
|
|
+Bool bgNoneRoot=FALSE;
|
|
|
|
_X_EXPORT TimeStamp currentTime;
|
|
_X_EXPORT TimeStamp lastDeviceEventTime;
|
|
diff --git a/dix/window.c b/dix/window.c
|
|
index 6b95068..4b35e68 100644
|
|
--- a/dix/window.c
|
|
+++ b/dix/window.c
|
|
@@ -504,17 +504,24 @@ InitRootWindow(WindowPtr pWin)
|
|
pWin->optional->cursor = rootCursor;
|
|
rootCursor->refcnt++;
|
|
|
|
-
|
|
- if (!blackRoot && !whiteRoot) {
|
|
- MakeRootTile(pWin);
|
|
+ if (bgNoneRoot)
|
|
+ {
|
|
+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
|
|
+ pWin->background.pixel = pScreen->whitePixel;
|
|
backFlag |= CWBackPixmap;
|
|
}
|
|
- else {
|
|
+ else if (blackRoot || whiteRoot)
|
|
+ {
|
|
if (blackRoot)
|
|
pWin->background.pixel = pScreen->blackPixel;
|
|
else
|
|
pWin->background.pixel = pScreen->whitePixel;
|
|
backFlag |= CWBackPixel;
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ MakeRootTile(pWin);
|
|
+ backFlag |= CWBackPixmap;
|
|
}
|
|
|
|
pWin->backingStore = defaultBackingStore;
|
|
diff --git a/include/opaque.h b/include/opaque.h
|
|
index d5abcbd..1b6cc33 100644
|
|
--- a/include/opaque.h
|
|
+++ b/include/opaque.h
|
|
@@ -72,6 +72,7 @@ extern Bool defeatAccessControl;
|
|
extern long maxBigRequestSize;
|
|
extern Bool blackRoot;
|
|
extern Bool whiteRoot;
|
|
+extern Bool bgNoneRoot;
|
|
|
|
extern Bool CoreDump;
|
|
|
|
diff --git a/os/utils.c b/os/utils.c
|
|
index e885666..ed474c8 100644
|
|
--- a/os/utils.c
|
|
+++ b/os/utils.c
|
|
@@ -599,6 +599,7 @@ void UseMsg(void)
|
|
#endif
|
|
ErrorF("-nolisten string don't listen on protocol\n");
|
|
ErrorF("-noreset don't reset after last client exists\n");
|
|
+ ErrorF("-nr create root window with no background\n");
|
|
ErrorF("-reset reset after last client exists\n");
|
|
ErrorF("-p # screen-saver pattern duration (minutes)\n");
|
|
ErrorF("-pn accept failure to listen on all ports\n");
|
|
@@ -956,6 +957,8 @@ ProcessCommandLine(int argc, char *argv[])
|
|
defaultBackingStore = WhenMapped;
|
|
else if ( strcmp( argv[i], "-wr") == 0)
|
|
whiteRoot = TRUE;
|
|
+ else if ( strcmp( argv[i], "-nr") == 0)
|
|
+ bgNoneRoot = TRUE;
|
|
else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
|
|
if(++i < argc) {
|
|
long reqSizeArg = atol(argv[i]);
|
|
--
|
|
1.5.6.GIT
|
|
|