summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch156
1 files changed, 156 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
new file mode 100644
index 0000000000..ef53689bd0
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
@@ -0,0 +1,156 @@
1From a3e15680da24cb8259f6a83dee0c930dab024290 Mon Sep 17 00:00:00 2001
2From: Kristian <krh@redhat.com>
3Date: Fri, 15 Aug 2008 15:15:14 +1000
4Subject: [PATCH] Add nr for background=none root
5
6---
7 dix/globals.c | 1 +
8 dix/window.c | 22 ++++++++++++----------
9 hw/xfree86/common/xf86Init.c | 11 +++++++++++
10 hw/xfree86/common/xf86str.h | 5 ++++-
11 include/opaque.h | 1 +
12 os/utils.c | 3 +++
13 6 files changed, 32 insertions(+), 11 deletions(-)
14
15diff --git a/dix/globals.c b/dix/globals.c
16index 973dc43..dbd76bb 100644
17--- a/dix/globals.c
18+++ b/dix/globals.c
19@@ -141,6 +141,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
20 CursorPtr rootCursor;
21 Bool party_like_its_1989 = FALSE;
22 Bool whiteRoot = FALSE;
23+Bool bgNoneRoot = FALSE;
24
25 int cursorScreenDevPriv[MAXSCREENS];
26
27diff --git a/dix/window.c b/dix/window.c
28index c31fa87..8bb178d 100644
29--- a/dix/window.c
30+++ b/dix/window.c
31@@ -482,23 +482,24 @@ InitRootWindow(WindowPtr pWin)
32 pWin->cursorIsNone = FALSE;
33 pWin->optional->cursor = rootCursor;
34 rootCursor->refcnt++;
35-
36+ pWin->backingStore = defaultBackingStore;
37+ pWin->forcedBS = (defaultBackingStore != NotUseful);
38
39 if (party_like_its_1989) {
40 MakeRootTile(pWin);
41 backFlag |= CWBackPixmap;
42+ pScreen->ChangeWindowAttributes(pWin, backFlag);
43+ } else if (bgNoneRoot) {
44+ /* nothing, handled in xf86CreateRootWindow */
45 } else {
46 if (whiteRoot)
47 pWin->background.pixel = pScreen->whitePixel;
48 else
49 pWin->background.pixel = pScreen->blackPixel;
50 backFlag |= CWBackPixel;
51- }
52
53- pWin->backingStore = defaultBackingStore;
54- pWin->forcedBS = (defaultBackingStore != NotUseful);
55- /* We SHOULD check for an error value here XXX */
56- (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
57+ pScreen->ChangeWindowAttributes(pWin, backFlag);
58+ }
59
60 MapWindow(pWin, serverClient);
61 }
62diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
63index 236c00b..083a6ac 100644
64--- a/hw/xfree86/common/xf86Init.c
65+++ b/hw/xfree86/common/xf86Init.c
66@@ -79,6 +79,7 @@
67 #ifdef RENDER
68 #include "picturestr.h"
69 #endif
70+#include "xace.h"
71
72 #include "globals.h"
73
74@@ -328,6 +329,7 @@ xf86CreateRootWindow(WindowPtr pWin)
75 int ret = TRUE;
76 int err = Success;
77 ScreenPtr pScreen = pWin->drawable.pScreen;
78+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
79 RootWinPropPtr pProp;
80 CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
81 dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
82@@ -381,6 +383,15 @@ xf86CreateRootWindow(WindowPtr pWin)
83 }
84 }
85
86+ if (bgNoneRoot && pScrn->canDoBGNoneRoot || 1) {
87+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
88+ pWin->background.pixel = pScreen->whitePixel;
89+ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
90+ } else {
91+ pWin->background.pixel = pScreen->blackPixel;
92+ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
93+ }
94+
95 #ifdef DEBUG
96 ErrorF("xf86CreateRootWindow() returns %d\n", ret);
97 #endif
98diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
99index 904c369..8c38f69 100644
100--- a/hw/xfree86/common/xf86str.h
101+++ b/hw/xfree86/common/xf86str.h
102@@ -531,7 +531,7 @@ typedef struct _confdrirec {
103 } confDRIRec, *confDRIPtr;
104
105 /* These values should be adjusted when new fields are added to ScrnInfoRec */
106-#define NUM_RESERVED_INTS 16
107+#define NUM_RESERVED_INTS 15
108 #define NUM_RESERVED_POINTERS 15
109 #define NUM_RESERVED_FUNCS 11
110
111@@ -959,6 +959,9 @@ typedef struct _ScrnInfoRec {
112 ClockRangesPtr clockRanges;
113 int adjustFlags;
114
115+ /* -nr support */
116+ int canDoBGNoneRoot;
117+
118 /*
119 * These can be used when the minor ABI version is incremented.
120 * The NUM_* parameters must be reduced appropriately to keep the
121diff --git a/include/opaque.h b/include/opaque.h
122index 07a0715..be1577b 100644
123--- a/include/opaque.h
124+++ b/include/opaque.h
125@@ -71,6 +71,7 @@ extern Bool defeatAccessControl;
126 extern long maxBigRequestSize;
127 extern Bool party_like_its_1989;
128 extern Bool whiteRoot;
129+extern Bool bgNoneRoot;
130
131 extern Bool CoreDump;
132
133diff --git a/os/utils.c b/os/utils.c
134index b100949..c41b45b 100644
135--- a/os/utils.c
136+++ b/os/utils.c
137@@ -515,6 +515,7 @@ void UseMsg(void)
138 #endif
139 ErrorF("-nolisten string don't listen on protocol\n");
140 ErrorF("-noreset don't reset after last client exists\n");
141+ ErrorF("-nr create root window with no background\n");
142 ErrorF("-reset reset after last client exists\n");
143 ErrorF("-p # screen-saver pattern duration (minutes)\n");
144 ErrorF("-pn accept failure to listen on all ports\n");
145@@ -859,6 +860,8 @@ ProcessCommandLine(int argc, char *argv[])
146 defaultBackingStore = WhenMapped;
147 else if ( strcmp( argv[i], "-wr") == 0)
148 whiteRoot = TRUE;
149+ else if ( strcmp( argv[i], "-nr") == 0)
150+ bgNoneRoot = TRUE;
151 else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
152 if(++i < argc) {
153 long reqSizeArg = atol(argv[i]);
154--
1551.5.3.4
156