1
0

- Adapted and fixed 'noroot-background' patch originally coming from

the Moblin project and enable by default.

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=248
This commit is contained in:
Egbert Eich 2010-04-08 14:20:29 +00:00 committed by Git OBS Bridge
parent a2b50f1252
commit 322e7845aa
3 changed files with 56 additions and 53 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Apr 8 13:42:43 UTC 2010 - eich@novell.com
- Adapted and fixed 'noroot-background' patch originally coming from
the Moblin project and enable by default.
-------------------------------------------------------------------
Thu Apr 8 12:20:38 UTC 2010 - eich@suse.de

View File

@ -109,9 +109,7 @@ Patch145: driver-autoconfig.diff
Patch147: xserver-1.6.1-nouveau.patch
# Moblin
Patch162: cache-xkbcomp-output-for-fast-start-up.patch
%if %moblin
Patch163: xserver-1.5.0-bg-none-root.patch
%endif
Patch163: xserver-bg-none-root.patch
Patch164: xorg-detect-psb.patch
%if %moblin
Patch168: moblin-xserver-no-root-2.patch
@ -236,9 +234,7 @@ popd
%patch145 -p0
%patch147 -p1
%patch162 -p1
%if %moblin
%patch163 -p1
%endif
%patch164 -p1
%if %moblin
%patch168 -p1

View File

@ -12,11 +12,11 @@ Subject: [PATCH] Add nr for background=none root
os/utils.c | 3 +++
6 files changed, 32 insertions(+), 11 deletions(-)
Index: xorg-server-1.6.3/dix/globals.c
Index: xorg-server-1.8.0/dix/globals.c
===================================================================
--- xorg-server-1.6.3.orig/dix/globals.c
+++ xorg-server-1.6.3/dix/globals.c
@@ -141,6 +141,7 @@ FontPtr defaultFont; /* not declared i
--- xorg-server-1.8.0.orig/dix/globals.c
+++ xorg-server-1.8.0/dix/globals.c
@@ -124,6 +124,7 @@ FontPtr defaultFont; /* not declared i
CursorPtr rootCursor;
Bool party_like_its_1989 = FALSE;
Bool whiteRoot = FALSE;
@ -24,11 +24,11 @@ Index: xorg-server-1.6.3/dix/globals.c
int cursorScreenDevPriv[MAXSCREENS];
Index: xorg-server-1.6.3/dix/window.c
Index: xorg-server-1.8.0/dix/window.c
===================================================================
--- xorg-server-1.6.3.orig/dix/window.c
+++ xorg-server-1.6.3/dix/window.c
@@ -479,23 +479,24 @@ InitRootWindow(WindowPtr pWin)
--- xorg-server-1.8.0.orig/dix/window.c
+++ xorg-server-1.8.0/dix/window.c
@@ -465,23 +465,24 @@ InitRootWindow(WindowPtr pWin)
pWin->cursorIsNone = FALSE;
pWin->optional->cursor = rootCursor;
rootCursor->refcnt++;
@ -59,19 +59,19 @@ Index: xorg-server-1.6.3/dix/window.c
MapWindow(pWin, serverClient);
}
Index: xorg-server-1.6.3/hw/xfree86/common/xf86Init.c
Index: xorg-server-1.8.0/hw/xfree86/common/xf86Init.c
===================================================================
--- xorg-server-1.6.3.orig/hw/xfree86/common/xf86Init.c
+++ xorg-server-1.6.3/hw/xfree86/common/xf86Init.c
@@ -79,6 +79,7 @@
--- xorg-server-1.8.0.orig/hw/xfree86/common/xf86Init.c
+++ xorg-server-1.8.0/hw/xfree86/common/xf86Init.c
@@ -77,6 +77,7 @@
#ifdef RENDER
#include "picturestr.h"
#endif
+#include "xace.h"
#include "xf86VGAarbiter.h"
#include "globals.h"
@@ -328,6 +329,7 @@ xf86CreateRootWindow(WindowPtr pWin)
@@ -256,6 +257,7 @@ xf86CreateRootWindow(WindowPtr pWin)
int ret = TRUE;
int err = Success;
ScreenPtr pScreen = pWin->drawable.pScreen;
@ -79,37 +79,38 @@ Index: xorg-server-1.6.3/hw/xfree86/common/xf86Init.c
RootWinPropPtr pProp;
CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
@@ -381,6 +383,15 @@ xf86CreateRootWindow(WindowPtr pWin)
@@ -306,6 +308,16 @@ xf86CreateRootWindow(WindowPtr pWin)
ret = FALSE;
}
}
+ if (bgNoneRoot && pScrn->canDoBGNoneRoot || 1) {
+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
+ pWin->background.pixel = pScreen->whitePixel;
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
+ } else {
+ pWin->background.pixel = pScreen->blackPixel;
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
+ if (bgNoneRoot) {
+ if (pScrn->canDoBGNoneRoot) {
+ pWin->backgroundState = XaceBackgroundNoneState(pWin);
+ pWin->background.pixel = pScreen->whitePixel;
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
+ } else {
+ pWin->background.pixel = pScreen->blackPixel;
+ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
+ }
+ }
+
#ifdef DEBUG
ErrorF("xf86CreateRootWindow() returns %d\n", ret);
#endif
Index: xorg-server-1.6.3/hw/xfree86/common/xf86str.h
DebugF("xf86CreateRootWindow() returns %d\n", ret);
return (ret);
Index: xorg-server-1.8.0/hw/xfree86/common/xf86str.h
===================================================================
--- xorg-server-1.6.3.orig/hw/xfree86/common/xf86str.h
+++ xorg-server-1.6.3/hw/xfree86/common/xf86str.h
@@ -531,7 +531,7 @@ typedef struct _confdrirec {
--- xorg-server-1.8.0.orig/hw/xfree86/common/xf86str.h
+++ xorg-server-1.8.0/hw/xfree86/common/xf86str.h
@@ -503,7 +503,7 @@ typedef struct _confdrirec {
} confDRIRec, *confDRIPtr;
/* These values should be adjusted when new fields are added to ScrnInfoRec */
-#define NUM_RESERVED_INTS 16
+#define NUM_RESERVED_INTS 15
#define NUM_RESERVED_POINTERS 15
#define NUM_RESERVED_POINTERS 14
#define NUM_RESERVED_FUNCS 11
@@ -959,6 +959,9 @@ typedef struct _ScrnInfoRec {
ClockRangesPtr clockRanges;
@@ -775,6 +775,9 @@ typedef struct _ScrnInfoRec {
ClockRangePtr clockRanges;
int adjustFlags;
+ /* -nr support */
@ -118,23 +119,23 @@ Index: xorg-server-1.6.3/hw/xfree86/common/xf86str.h
/*
* These can be used when the minor ABI version is incremented.
* The NUM_* parameters must be reduced appropriately to keep the
Index: xorg-server-1.6.3/include/opaque.h
Index: xorg-server-1.8.0/include/opaque.h
===================================================================
--- xorg-server-1.6.3.orig/include/opaque.h
+++ xorg-server-1.6.3/include/opaque.h
@@ -71,6 +71,7 @@ extern Bool defeatAccessControl;
extern long maxBigRequestSize;
extern Bool party_like_its_1989;
extern Bool whiteRoot;
+extern Bool bgNoneRoot;
--- xorg-server-1.8.0.orig/include/opaque.h
+++ xorg-server-1.8.0/include/opaque.h
@@ -71,6 +71,7 @@ extern _X_EXPORT Bool defeatAccessContro
extern _X_EXPORT long maxBigRequestSize;
extern _X_EXPORT Bool party_like_its_1989;
extern _X_EXPORT Bool whiteRoot;
+extern _X_EXPORT Bool bgNoneRoot;
extern Bool CoreDump;
extern _X_EXPORT Bool CoreDump;
Index: xorg-server-1.6.3/os/utils.c
Index: xorg-server-1.8.0/os/utils.c
===================================================================
--- xorg-server-1.6.3.orig/os/utils.c
+++ xorg-server-1.6.3/os/utils.c
@@ -515,6 +515,7 @@ void UseMsg(void)
--- xorg-server-1.8.0.orig/os/utils.c
+++ xorg-server-1.8.0/os/utils.c
@@ -511,6 +511,7 @@ void UseMsg(void)
#endif
ErrorF("-nolisten string don't listen on protocol\n");
ErrorF("-noreset don't reset after last client exists\n");
@ -142,7 +143,7 @@ Index: xorg-server-1.6.3/os/utils.c
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");
@@ -859,6 +860,8 @@ ProcessCommandLine(int argc, char *argv[
@@ -852,6 +853,8 @@ ProcessCommandLine(int argc, char *argv[
defaultBackingStore = WhenMapped;
else if ( strcmp( argv[i], "-wr") == 0)
whiteRoot = TRUE;