Skip to content
Snippets Groups Projects
Commit e2a3e91a authored by Adam Jackson's avatar Adam Jackson :headphones:
Browse files

rootless: remove redundant RootlessShapedWindowIn


miShapedWindowIn is identical.  Which you would expect, since neither
one takes an actual WindowPtr argument, so they couldn't possibly make
reference to rootlessness.

Reviewed-by: default avatarJulien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 7e8ac6dc
No related branches found
No related tags found
No related merge requests found
...@@ -106,64 +106,6 @@ Equipment Corporation. ...@@ -106,64 +106,6 @@ Equipment Corporation.
int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind);
/*
* Compute the visibility of a shaped window
*/
static int
RootlessShapedWindowIn(RegionPtr universe,
RegionPtr bounding, BoxPtr rect, int x, int y)
{
BoxRec box;
register BoxPtr boundBox;
int nbox;
Bool someIn, someOut;
register int t, x1, y1, x2, y2;
nbox = RegionNumRects(bounding);
boundBox = RegionRects(bounding);
someIn = someOut = FALSE;
x1 = rect->x1;
y1 = rect->y1;
x2 = rect->x2;
y2 = rect->y2;
while (nbox--) {
if ((t = boundBox->x1 + x) < x1)
t = x1;
box.x1 = t;
if ((t = boundBox->y1 + y) < y1)
t = y1;
box.y1 = t;
if ((t = boundBox->x2 + x) > x2)
t = x2;
box.x2 = t;
if ((t = boundBox->y2 + y) > y2)
t = y2;
box.y2 = t;
if (box.x1 > box.x2)
box.x2 = box.x1;
if (box.y1 > box.y2)
box.y2 = box.y1;
switch (RegionContainsRect(universe, &box)) {
case rgnIN:
if (someOut)
return rgnPART;
someIn = TRUE;
break;
case rgnOUT:
if (someIn)
return rgnPART;
someOut = TRUE;
break;
default:
return rgnPART;
}
boundBox++;
}
if (someIn)
return rgnIN;
return rgnOUT;
}
#define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \
HasBorder(w) && \ HasBorder(w) && \
(w)->backgroundState == ParentRelative) (w)->backgroundState == ParentRelative)
...@@ -229,10 +171,9 @@ RootlessComputeClips(WindowPtr pParent, ScreenPtr pScreen, ...@@ -229,10 +171,9 @@ RootlessComputeClips(WindowPtr pParent, ScreenPtr pScreen,
RegionPtr pBounding; RegionPtr pBounding;
if ((pBounding = wBoundingShape(pParent))) { if ((pBounding = wBoundingShape(pParent))) {
switch (RootlessShapedWindowIn(universe, switch (miShapedWindowIn(universe, pBounding, &borderSize,
pBounding, &borderSize, pParent->drawable.x,
pParent->drawable.x, pParent->drawable.y)) {
pParent->drawable.y)) {
case rgnIN: case rgnIN:
newVis = VisibilityUnobscured; newVis = VisibilityUnobscured;
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment