Commit 53d32c94 authored by Adam Jackson's avatar Adam Jackson 🥃 Committed by Adam Jackson

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's avatarAdam Jackson <ajax@redhat.com>
parent 382c26da
......@@ -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;
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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.
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment