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

View File

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