Revert "mi: drop obsolete miOverlaySetRootClip()"
This reverts commit 00796cbf8c
.
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843>
This commit is contained in:
parent
0463d7aaaa
commit
d4f92a5688
|
@ -54,3 +54,59 @@ typedef struct {
|
||||||
Bool underlayMarked;
|
Bool underlayMarked;
|
||||||
Bool copyUnderlay;
|
Bool copyUnderlay;
|
||||||
} miOverlayScreenRec, *miOverlayScreenPtr;
|
} miOverlayScreenRec, *miOverlayScreenPtr;
|
||||||
|
|
||||||
|
static DevPrivateKeyRec miOverlayWindowKeyRec;
|
||||||
|
|
||||||
|
#define miOverlayWindowKey (&miOverlayWindowKeyRec)
|
||||||
|
|
||||||
|
static void MarkUnderlayWindow(WindowPtr);
|
||||||
|
|
||||||
|
#define MIOVERLAY_GET_WINDOW_PRIVATE(pWin) ((miOverlayWindowPtr) \
|
||||||
|
dixLookupPrivate(&(pWin)->devPrivates, miOverlayWindowKey))
|
||||||
|
#define MIOVERLAY_GET_WINDOW_TREE(pWin) \
|
||||||
|
(MIOVERLAY_GET_WINDOW_PRIVATE(pWin)->tree)
|
||||||
|
|
||||||
|
#define MARK_UNDERLAY(w) MarkUnderlayWindow(w)
|
||||||
|
|
||||||
|
/* We need this as an addition since the xf86 common code doesn't
|
||||||
|
know about the second tree which is static to this file. */
|
||||||
|
|
||||||
|
void
|
||||||
|
miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
|
||||||
|
{
|
||||||
|
WindowPtr pRoot = pScreen->root;
|
||||||
|
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot);
|
||||||
|
|
||||||
|
MARK_UNDERLAY(pRoot);
|
||||||
|
|
||||||
|
if (enable) {
|
||||||
|
BoxRec box;
|
||||||
|
|
||||||
|
box.x1 = 0;
|
||||||
|
box.y1 = 0;
|
||||||
|
box.x2 = pScreen->width;
|
||||||
|
box.y2 = pScreen->height;
|
||||||
|
|
||||||
|
RegionReset(&pTree->borderClip, &box);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
RegionEmpty(&pTree->borderClip);
|
||||||
|
|
||||||
|
RegionBreak(&pTree->clipList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
MarkUnderlayWindow(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
||||||
|
|
||||||
|
if (pTree->valdata)
|
||||||
|
return;
|
||||||
|
pTree->valdata =
|
||||||
|
(miOverlayValDataPtr) XNFalloc(sizeof(miOverlayValDataRec));
|
||||||
|
pTree->valdata->oldAbsCorner.x = pWin->drawable.x;
|
||||||
|
pTree->valdata->oldAbsCorner.y = pWin->drawable.y;
|
||||||
|
pTree->valdata->borderVisible = NullRegion;
|
||||||
|
}
|
||||||
|
|
|
@ -9,4 +9,6 @@
|
||||||
typedef void (*miOverlayTransFunc) (ScreenPtr, int, BoxPtr);
|
typedef void (*miOverlayTransFunc) (ScreenPtr, int, BoxPtr);
|
||||||
typedef Bool (*miOverlayInOverlayFunc) (WindowPtr);
|
typedef Bool (*miOverlayInOverlayFunc) (WindowPtr);
|
||||||
|
|
||||||
|
extern _X_EXPORT void miOverlaySetRootClip(ScreenPtr, Bool);
|
||||||
|
|
||||||
#endif /* __MIOVERLAY_H */
|
#endif /* __MIOVERLAY_H */
|
||||||
|
|
Loading…
Reference in New Issue