summaryrefslogtreecommitdiff
path: root/Xext/mbuf.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-01-20 00:17:42 -0500
committerAdam Jackson <ajax@redhat.com>2009-01-20 00:18:02 -0500
commit20d2117eb82fb7ce91afd4f01fe1b9d4b1bf0459 (patch)
tree3d5b1ba74a198f93ec4182e5d3ef799260e9b291 /Xext/mbuf.c
parente1611d8d55ade35bf8c2e1da7bc2dbf05b011301 (diff)
Move CreateUnclippedWinSize to mbuf
It's the only user, so.
Diffstat (limited to 'Xext/mbuf.c')
-rw-r--r--Xext/mbuf.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/Xext/mbuf.c b/Xext/mbuf.c
index 81b704f2f..827603204 100644
--- a/Xext/mbuf.c
+++ b/Xext/mbuf.c
@@ -1106,6 +1106,32 @@ SClobberNotifyEvent (from, to)
to->state = from->state;
}
+RegionPtr
+CreateUnclippedWinSize (WindowPtr pWin)
+{
+ RegionPtr pRgn;
+ BoxRec box;
+
+ box.x1 = pWin->drawable.x;
+ box.y1 = pWin->drawable.y;
+ box.x2 = pWin->drawable.x + (int) pWin->drawable.width;
+ box.y2 = pWin->drawable.y + (int) pWin->drawable.height;
+ pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
+ if (wBoundingShape (pWin) || wClipShape (pWin)) {
+ ScreenPtr pScreen;
+ pScreen = pWin->drawable.pScreen;
+
+ REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
+ - pWin->drawable.y);
+ if (wBoundingShape (pWin))
+ REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin));
+ if (wClipShape (pWin))
+ REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin));
+ REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y);
+ }
+ return pRgn;
+}
+
static void
PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf)
MultibufferPtr *pMultibuffer;