summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-09-23 10:35:37 -0400
committerAdam Jackson <ajax@redhat.com>2014-10-09 11:14:52 +0200
commit7b35dc9b1533d4b99a3f84f460ac66354a6fe347 (patch)
tree36b696a52c3fa08f41898469128364030696c77d
parentfb34f273481b90a90a988f0f5c5a2d642a5661b8 (diff)
mi: Deobfuscate miOverlayWindowExposures
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--mi/mioverlay.c40
1 files changed, 12 insertions, 28 deletions
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index f894e2ba0..2ad6bc082 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -983,28 +983,19 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
{
RegionPtr exposures = prgn;
- if ((prgn && !RegionNil(prgn)) || (exposures && !RegionNil(exposures))) {
+ if (prgn && !RegionNil(prgn)) {
RegionRec expRec;
- int clientInterested;
-
- clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) &
- ExposureMask;
- if (clientInterested && exposures &&
- (RegionNumRects(exposures) > RECTLIMIT)) {
+ int clientInterested =
+ (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
+ if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
BoxRec box;
- box = *RegionExtents(exposures);
- if (exposures == prgn) {
- exposures = &expRec;
- RegionInit(exposures, &box, 1);
- RegionReset(prgn, &box);
- }
- else {
- RegionReset(exposures, &box);
- RegionUnion(prgn, prgn, exposures);
- }
+ box = *RegionExtents(prgn);
+ exposures = &expRec;
+ RegionInit(exposures, &box, 1);
+ RegionReset(prgn, &box);
/* This is the only reason why we are replacing mi's version
of this file */
@@ -1016,21 +1007,14 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
else
RegionIntersect(prgn, prgn, &pWin->clipList);
}
- if (prgn && !RegionNil(prgn))
- miPaintWindow(pWin, prgn, PW_BACKGROUND);
- if (clientInterested && exposures && !RegionNil(exposures))
+ miPaintWindow(pWin, prgn, PW_BACKGROUND);
+ if (clientInterested)
miSendExposures(pWin, exposures,
pWin->drawable.x, pWin->drawable.y);
- if (exposures == &expRec) {
+ if (exposures == &expRec)
RegionUninit(exposures);
- }
- else if (exposures && exposures != prgn)
- RegionDestroy(exposures);
- if (prgn)
- RegionEmpty(prgn);
+ RegionEmpty(prgn);
}
- else if (exposures && exposures != prgn)
- RegionDestroy(exposures);
}
typedef struct {