diff options
author | Adam Jackson <ajax@redhat.com> | 2018-10-23 14:09:55 -0400 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2018-10-23 18:37:46 +0000 |
commit | 53d32c94f39b4a89f70fed2e102c5fb5d6cae8bc (patch) | |
tree | 12c20d00eb6edb40d2e5840937d7833e4171a129 | |
parent | 382c26dade81a4c629307a3bfe6f5cca5af640e0 (diff) | |
download | xserver-53d32c94f39b4a89f70fed2e102c5fb5d6cae8bc.tar.gz |
dix: Remove the magic WhenMapped backing store hack
Automatic compositing exists, if that's what you want then use it.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | dix/window.c | 20 | ||||
-rw-r--r-- | include/opaque.h | 1 | ||||
-rw-r--r-- | include/windowstr.h | 1 | ||||
-rw-r--r-- | man/Xserver.man | 11 | ||||
-rw-r--r-- | os/utils.c | 3 |
5 files changed, 2 insertions, 34 deletions
diff --git a/dix/window.c b/dix/window.c index 8789a5ece..2b599e788 100644 --- a/dix/window.c +++ b/dix/window.c @@ -468,9 +468,6 @@ WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, void *data) return (TraverseTree(pScreen->root, func, data)); } -/* hack for forcing backing store on all windows */ -int defaultBackingStore = NotUseful; - /* hack to force no backing store */ Bool disableBackingStore = FALSE; Bool enableBackingStore = FALSE; @@ -502,7 +499,6 @@ SetWindowToDefaults(WindowPtr pWin) pWin->eventMask = 0; pWin->deliverableEvents = 0; pWin->dontPropagate = 0; - pWin->forcedBS = FALSE; pWin->redirectDraw = RedirectDrawNone; pWin->forcedBG = FALSE; pWin->unhittable = FALSE; @@ -693,8 +689,7 @@ InitRootWindow(WindowPtr pWin) backFlag |= CWBackPixel; } - pWin->backingStore = defaultBackingStore; - pWin->forcedBS = (defaultBackingStore != NotUseful); + pWin->backingStore = NotUseful; /* We SHOULD check for an error value here XXX */ (*pScreen->ChangeWindowAttributes) (pWin, backFlag); @@ -943,13 +938,6 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, DeleteWindow(pWin, None); return NullWindow; } - if (!(vmask & CWBackingStore) && (defaultBackingStore != NotUseful)) { - XID value = defaultBackingStore; - - (void) ChangeWindowAttributes(pWin, CWBackingStore, &value, - wClient(pWin)); - pWin->forcedBS = TRUE; - } if (SubSend(pParent)) { xEvent event = { @@ -1341,7 +1329,6 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) goto PatchUp; } pWin->backingStore = val; - pWin->forcedBS = FALSE; break; case CWBackingPlanes: if (pWin->optional || ((CARD32) *pVlist != (CARD32) ~0L)) { @@ -1610,10 +1597,7 @@ GetWindowAttributes(WindowPtr pWin, ClientPtr client, wa->type = X_Reply; wa->bitGravity = pWin->bitGravity; wa->winGravity = pWin->winGravity; - if (pWin->forcedBS && pWin->backingStore != Always) - wa->backingStore = NotUseful; - else - wa->backingStore = pWin->backingStore; + wa->backingStore = pWin->backingStore; wa->length = bytes_to_int32(sizeof(xGetWindowAttributesReply) - sizeof(xGenericReply)); wa->sequenceNumber = client->sequence; diff --git a/include/opaque.h b/include/opaque.h index bb1f5027b..cfe0a6547 100644 --- a/include/opaque.h +++ b/include/opaque.h @@ -53,7 +53,6 @@ extern _X_EXPORT const char *display; extern _X_EXPORT int displayfd; extern _X_EXPORT Bool explicit_display; -extern _X_EXPORT int defaultBackingStore; extern _X_EXPORT Bool disableBackingStore; extern _X_EXPORT Bool enableBackingStore; extern _X_EXPORT Bool enableIndirectGLX; diff --git a/include/windowstr.h b/include/windowstr.h index 4383dabdc..bf31b9eee 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -159,7 +159,6 @@ typedef struct _Window { unsigned realized:1; /* ancestors are all mapped */ unsigned viewable:1; /* realized && InputOutput */ unsigned dontPropagate:3; /* index into DontPropagateMasks */ - unsigned forcedBS:1; /* system-supplied backingStore */ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */ unsigned forcedBG:1; /* must have an opaque background */ unsigned unhittable:1; /* doesn't hit-test, for rootless */ diff --git a/man/Xserver.man b/man/Xserver.man index 31ffb8cff..2b2114ac6 100644 --- a/man/Xserver.man +++ b/man/Xserver.man @@ -289,17 +289,6 @@ sets video-off screen-saver preference. .B \-v sets video-on screen-saver preference. .TP 8 -.B \-wm -forces the default backing-store of all windows to be WhenMapped. This -is a backdoor way of getting backing-store to apply to all windows. -Although all mapped windows will have backing store, the backing store -attribute value reported by the server for a window will be the last -value established by a client. If it has never been set by a client, -the server will report the default value, NotUseful. This behavior is -required by the X protocol, which allows the server to exceed the -client's backing store expectations but does not provide a way to tell -the client that it is doing so. -.TP 8 .B \-wr sets the default root window to solid white instead of the standard root weave pattern. diff --git a/os/utils.c b/os/utils.c index 6e3c16869..17ad22ca2 100644 --- a/os/utils.c +++ b/os/utils.c @@ -566,7 +566,6 @@ UseMsg(void) ErrorF("ttyxx server started from init on /dev/ttyxx\n"); 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("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX @@ -943,8 +942,6 @@ ProcessCommandLine(int argc, char *argv[]) defaultScreenSaverBlanking = PreferBlanking; else if (strcmp(argv[i], "-v") == 0) 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], "-background") == 0) { |