Commit 6ad3d1ea7ff717d9b34cf3fd61a326ea4405935b

Authored by Marco Trevisan (Treviño)
Committed by Bileto Bot
2 parents 25573ef4 cb7ac912

Region: define static const functions returning infinite and empty regions

As per https://gcc.gnu.org/ml/gcc-help/2010-10/msg00255.html we can't define some
static variables as extern and link them statically inside objects.
Otherwise these might be redefined multiple times, allocated mutiple times and
destroyed, again, multiple times causing memory errors. (LP: #1749957, #1750619)

Approved by: Andrea Azzarone
include/core/abiversion.h
... ... @@ -5,6 +5,6 @@
5 5 # error Conflicting definitions of CORE_ABIVERSION
6 6 #endif
7 7  
8   -#define CORE_ABIVERSION 20170630
  8 +#define CORE_ABIVERSION 20180221
9 9  
10 10 #endif // COMPIZ_ABIVERSION_H
... ...
plugins/animationaddon/src/beamup.cpp
... ... @@ -181,7 +181,7 @@ BeamUpAnim::step ()
181 181 }
182 182 else
183 183 {
184   - mDrawRegion = emptyRegion;
  184 + mDrawRegion = CompRegion::empty ();
185 185 }
186 186  
187 187 mUseDrawRegion = (fabs (newProgress) > 1e-5);
... ...
plugins/animationaddon/src/burn.cpp
... ... @@ -326,7 +326,7 @@ BurnAnim::step ()
326 326 }
327 327 else
328 328 {
329   - mDrawRegion = emptyRegion;
  329 + mDrawRegion = CompRegion::empty ();
330 330 }
331 331 mUseDrawRegion = (fabs (newProgress) > 1e-5);
332 332  
... ...
plugins/animationaddon/src/particle.cpp
... ... @@ -297,7 +297,7 @@ ParticleAnim::updateBB (CompOutput &output)
297 297 }
298 298 }
299 299  
300   - if (mUseDrawRegion && mDrawRegion != emptyRegion)
  300 + if (mUseDrawRegion && mDrawRegion != CompRegion::empty ())
301 301 // expand BB with bounding box of draw region
302 302 mAWindow->expandBBWithBox (mDrawRegion.handle ()->extents);
303 303 else // drawing full window
... ...
plugins/animationplus/src/bonanza.cpp
... ... @@ -208,12 +208,12 @@ BonanzaAnim::step (float time)
208 208 }
209 209  
210 210 Region pointsRegion = XPolygonRegion (&pts[0], 20, WindingRule);;
211   - mDrawRegion = CompRegionRef(pointsRegion) - emptyRegion.united (rect);
  211 + mDrawRegion = CompRegionRef(pointsRegion) - CompRegion::empty ().united (rect);
212 212 XDestroyRegion (pointsRegion);
213 213 }
214 214 else
215 215 {
216   - mDrawRegion = emptyRegion;
  216 + mDrawRegion = CompRegion::empty ();
217 217 }
218 218  
219 219  
... ...
plugins/blur/src/blur.cpp
... ... @@ -449,7 +449,7 @@ BlurScreen::damageCutoff ()
449 449 * and then use the real damage in order to determine what blur regions
450 450 * should be updated
451 451 */
452   - backbufferUpdateRegionThisFrame &= emptyRegion;
  452 + backbufferUpdateRegionThisFrame &= CompRegion::empty ();
453 453 CompRegion frameAgeDamage = damageQuery->damageForFrameAge (cScreen->getFrameAge ());
454 454 foreach (CompWindow *w, screen->windows ())
455 455 {
... ... @@ -466,7 +466,7 @@ BlurScreen::damageCutoff ()
466 466 continue;
467 467  
468 468 if (!bw->projectedBlurRegion.isEmpty ())
469   - bw->projectedBlurRegion &= emptyRegion;
  469 + bw->projectedBlurRegion &= CompRegion::empty ();
470 470  
471 471 GLMatrix screenSpace;
472 472 screenSpace.toScreenSpace (this->output, -DEFAULT_Z_CAMERA);
... ... @@ -561,7 +561,7 @@ BlurWindow::glTransformationComplete (const GLMatrix &matrix,
561 561 clientThreshold = 0;
562 562  
563 563 if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
564   - reg = &infiniteRegion;
  564 + reg = &CompRegion::infinite ();
565 565 else
566 566 reg = &region;
567 567  
... ... @@ -1218,7 +1218,7 @@ BlurWindow::projectRegion (CompOutput *output,
1218 1218 GLTexture::MatrixList ml;
1219 1219  
1220 1220 gWindow->vertexBuffer ()->begin ();
1221   - gWindow->glAddGeometry (ml, bScreen->tmpRegion2, infiniteRegion);
  1221 + gWindow->glAddGeometry (ml, bScreen->tmpRegion2, CompRegion::infinite ());
1222 1222  
1223 1223 if (!gWindow->vertexBuffer ()->end ())
1224 1224 return;
... ... @@ -1627,7 +1627,7 @@ BlurWindow::glDraw (const GLMatrix &transform,
1627 1627 const CompRegion *reg = NULL;
1628 1628  
1629 1629 if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
1630   - reg = &infiniteRegion;
  1630 + reg = &CompRegion::infinite ();
1631 1631 else
1632 1632 reg = &region;
1633 1633  
... ...
plugins/compiztoolbox/src/compiztoolbox.cpp
... ... @@ -504,7 +504,7 @@ BaseSwitchWindow::paintThumb (const GLWindowPaintAttrib &attrib,
504 504 very ugly but necessary until the vertex stage has been made
505 505 fully pluggable. */
506 506 gWindow->glAddGeometrySetCurrentIndex (MAXSHORT);
507   - gWindow->glDraw (wTransform, sAttrib, infiniteRegion, mask);
  507 + gWindow->glDraw (wTransform, sAttrib, CompRegion::infinite (), mask);
508 508 gWindow->glAddGeometrySetCurrentIndex (addWindowGeometryIndex);
509 509  
510 510 gScreen->setTextureFilter (filter);
... ... @@ -552,7 +552,7 @@ BaseSwitchWindow::paintThumb (const GLWindowPaintAttrib &attrib,
552 552 gWindow->vertexBuffer ()->begin ();
553 553  
554 554 gWindow->glAddGeometrySetCurrentIndex (MAXSHORT);
555   - gWindow->glAddGeometry (matrix, iconReg, infiniteRegion);
  555 + gWindow->glAddGeometry (matrix, iconReg, CompRegion::infinite ());
556 556 gWindow->glAddGeometrySetCurrentIndex (addWindowGeometryIndex);
557 557  
558 558 if (gWindow->vertexBuffer ()->end ())
... ...
plugins/composite/src/backbuffertracking/tests/test-composite-backbuffertracking.cpp
... ... @@ -181,7 +181,7 @@ TEST_F (BackbufferTrackingCallbacks, NoTrackIntoCurrentIfCallbackFalse)
181 181 allowDamage (false);
182 182 CompRegion damage (100, 100, 100, 100);
183 183 roster->dirtyAreaOnCurrentFrame (damage);
184   - EXPECT_EQ (emptyRegion, roster->currentFrameDamage ());
  184 + EXPECT_EQ (CompRegion::empty (), roster->currentFrameDamage ());
185 185 }
186 186  
187 187 TEST_F (BackbufferTracking, DirtyAreaSubtraction)
... ... @@ -210,7 +210,7 @@ TEST_F (BackbufferTracking, NoDirtyAreaForLastFrame)
210 210 CompRegion all (0, 0, screen.width (), screen.height ());
211 211 roster->dirtyAreaOnCurrentFrame (all);
212 212 roster->incrementFrameAges ();
213   - EXPECT_EQ (emptyRegion, roster->damageForFrameAge (1));
  213 + EXPECT_EQ (CompRegion::empty (), roster->damageForFrameAge (1));
214 214 }
215 215  
216 216 TEST_F (BackbufferTracking, DirtyAreaIfMoreSinceLastFrame)
... ... @@ -429,21 +429,21 @@ TEST_F (AgeingDamageBuffers, DirtyAreaOnInvalidRosters)
429 429 {
430 430 EXPECT_CALL (mockDamageAgeTracker, dirtyAreaOnCurrentFrame (_)).Times (0);
431 431 ageing.unobserve (mockDamageAgeTracker);
432   - ageing.markAreaDirty (emptyRegion);
  432 + ageing.markAreaDirty (CompRegion::empty ());
433 433 }
434 434  
435 435 TEST_F (AgeingDamageBuffers, SubtractObscuredAreaOnInvalidRosters)
436 436 {
437 437 EXPECT_CALL (mockDamageAgeTracker, subtractObscuredArea (_)).Times (0);
438 438 ageing.unobserve (mockDamageAgeTracker);
439   - ageing.subtractObscuredArea (emptyRegion);
  439 + ageing.subtractObscuredArea (CompRegion::empty ());
440 440 }
441 441  
442 442 TEST_F (AgeingDamageBuffers, AddOverdrawAreaOnInvalidRosters)
443 443 {
444 444 EXPECT_CALL (mockDamageAgeTracker, overdrawRegionOnPaintingFrame (_)).Times (0);
445 445 ageing.unobserve (mockDamageAgeTracker);
446   - ageing.markAreaDirtyOnLastFrame (emptyRegion);
  446 + ageing.markAreaDirtyOnLastFrame (CompRegion::empty ());
447 447 }
448 448  
449 449  
... ...
plugins/decor/src/clip-groups/src/clip-groups.cpp
... ... @@ -41,7 +41,7 @@ GenericDecorClipGroup::doPopClippable (DecorClippableInterface *dc)
41 41 if (it != mClippables.end ())
42 42 {
43 43 dc->setOwner (NULL);
44   - dc->updateShadow (emptyRegion);
  44 + dc->updateShadow (CompRegion::empty ());
45 45 mClippables.erase (it);
46 46 regenerateClipRegion ();
47 47  
... ... @@ -54,7 +54,7 @@ GenericDecorClipGroup::doPopClippable (DecorClippableInterface *dc)
54 54 void
55 55 GenericDecorClipGroup::doRegenerateClipRegion ()
56 56 {
57   - mRegion -= infiniteRegion;
  57 + mRegion -= CompRegion::infinite ();
58 58  
59 59 foreach (DecorClippableInterface *clippable, mClippables)
60 60 {
... ...
plugins/decor/src/decor.cpp
... ... @@ -253,7 +253,7 @@ DecorWindow::glDecorate (const GLMatrix &transform,
253 253 PAINT_WINDOW_WITH_OFFSET_MASK)))
254 254 preg = &region;
255 255 else if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
256   - preg = &infiniteRegion;
  256 + preg = &CompRegion::infinite ();
257 257 else if (mClipGroup)
258 258 {
259 259 tmpRegion = mOutputRegion;
... ...
plugins/expo/src/expo.cpp
... ... @@ -1336,7 +1336,7 @@ ExpoWindow::glDraw (const GLMatrix &transform,
1336 1336 /* reset geometry and paint */
1337 1337 gWindow->vertexBuffer ()->begin ();
1338 1338 gWindow->vertexBuffer ()->end ();
1339   - paintGlow (transform, attrib, infiniteRegion, mask);
  1339 + paintGlow (transform, attrib, CompRegion::infinite (), mask);
1340 1340 }
1341 1341  
1342 1342 return status;
... ...
plugins/group/src/paint.cpp
... ... @@ -829,7 +829,7 @@ GroupWindow::glDraw (const GLMatrix &transform,
829 829 if (mGroup && (mGroup->mWindows.size () > 1) && mGlowQuads)
830 830 {
831 831 if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
832   - paintRegion = CompRegion (infiniteRegion);
  832 + paintRegion = CompRegion (CompRegion::infinite ());
833 833  
834 834 if (paintRegion.numRects ())
835 835 {
... ...
plugins/group/src/selection.cpp
... ... @@ -249,7 +249,7 @@ Selection::selectRegion ()
249 249 MIN (mY1, mY2) + 4;
250 250  
251 251 rect = CompRect (x, y, width, height);
252   - reg = emptyRegion.united (rect);
  252 + reg = CompRegion::empty ().united (rect);
253 253  
254 254 gs->cScreen->damageRegion (reg);
255 255  
... ...
plugins/group/src/tab.cpp
... ... @@ -2015,7 +2015,7 @@ GroupScreen::recalcSlotPos (GroupTabBarSlot *slot,
2015 2015 space = optionGetThumbSpace ();
2016 2016 thumbSize = optionGetThumbSize ();
2017 2017  
2018   - slot->mRegion = emptyRegion;
  2018 + slot->mRegion = CompRegion::empty ();
2019 2019  
2020 2020 /* Padding between slots, account for this */
2021 2021 box.setX (space + ((thumbSize + space) * slotPos));
... ...
plugins/imgsvg/src/imgsvg.cpp
... ... @@ -230,7 +230,7 @@ SvgWindow::glDraw (const GLMatrix &transform,
230 230 return status;
231 231  
232 232 const CompRegion &reg = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
233   - infiniteRegion : region;
  233 + CompRegion::infinite () : region;
234 234  
235 235 if (context && reg.numRects ())
236 236 {
... ...
plugins/kdecompat/src/kdecompat.cpp
... ... @@ -323,7 +323,7 @@ KDECompatWindow::glPaint (const GLWindowPaintAttrib &attrib,
323 323 matrices[0].y0 -= (tw->y () * icon->matrix ().yy);
324 324  
325 325 gtw->vertexBuffer ()->begin ();
326   - gtw->glAddGeometry (matrices, tw->geometry (), infiniteRegion);
  326 + gtw->glAddGeometry (matrices, tw->geometry (), CompRegion::infinite ());
327 327 gtw->vertexBuffer ()->end ();
328 328 }
329 329 }
... ... @@ -343,7 +343,7 @@ KDECompatWindow::glPaint (const GLWindowPaintAttrib &attrib,
343 343  
344 344 if (!gtw->textures ().empty ())
345 345 gtw->glDraw (wTransform, attrib,
346   - infiniteRegion, paintMask);
  346 + CompRegion::infinite (), paintMask);
347 347 else if (icon)
348 348 gtw->glDrawTexture (icon, wTransform, attrib, paintMask);
349 349 }
... ...
plugins/opacify/src/opacify.cpp
... ... @@ -407,7 +407,7 @@ OpacifyScreen::OpacifyScreen (CompScreen *screen) :
407 407 isToggle (optionGetInitToggle ()),
408 408 newActive (NULL),
409 409 active (screen->activeWindow ()),
410   - intersect (emptyRegion),
  410 + intersect (CompRegion::empty ()),
411 411 justMoved (false)
412 412 {
413 413 ScreenInterface::setHandler (screen, false);
... ...
plugins/opengl/src/paint.cpp
... ... @@ -1315,7 +1315,7 @@ GLWindow::glDraw (const GLMatrix &transform,
1315 1315 attrib, region, mask)
1316 1316  
1317 1317 const CompRegion &reg = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
1318   - infiniteRegion : region;
  1318 + CompRegion::infinite () : region;
1319 1319  
1320 1320 if (reg.isEmpty ())
1321 1321 return true;
... ...
plugins/resize/src/logic/src/resize-logic.cpp
... ... @@ -1440,7 +1440,7 @@ ResizeLogic::initiateResize (CompAction *action,
1440 1440 lastGoodSize = w->serverSize ();
1441 1441  
1442 1442 /* Combine the work areas of all outputs */
1443   - constraintRegion = emptyRegion;
  1443 + constraintRegion = CompRegion::empty ();
1444 1444 foreach (CompOutput &output, mScreen->outputDevs ())
1445 1445 constraintRegion += output.workArea ();
1446 1446 }
... ...
plugins/ring/src/ring.cpp
... ... @@ -768,7 +768,7 @@ RingScreen::glPaintOutput (const GLScreenPaintAttrib &attrib,
768 768 RING_WINDOW (w);
769 769  
770 770 status |= rw->gWindow->glPaint (rw->gWindow->paintAttrib (),
771   - sTransform, infiniteRegion, 0);
  771 + sTransform, CompRegion::infinite (), 0);
772 772 }
773 773  
774 774 if (mState != RingStateIn)
... ...
plugins/shift/src/shift.cpp
... ... @@ -1155,7 +1155,7 @@ ShiftScreen::glPaintOutput (const GLScreenPaintAttrib &attrib,
1155 1155 mActiveSlot = &mDrawSlots[i];
1156 1156 {
1157 1157 sw->gWindow->glPaint (sw->gWindow->paintAttrib (), rTransform,
1158   - infiniteRegion, 0);
  1158 + CompRegion::infinite (), 0);
1159 1159 }
1160 1160 }
1161 1161  
... ... @@ -1248,7 +1248,7 @@ ShiftScreen::glPaintOutput (const GLScreenPaintAttrib &attrib,
1248 1248 mActiveSlot = &mDrawSlots[i];
1249 1249 {
1250 1250 sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform,
1251   - infiniteRegion, 0);
  1251 + CompRegion::infinite (), 0);
1252 1252 }
1253 1253 }
1254 1254  
... ... @@ -1288,7 +1288,7 @@ ShiftScreen::glPaintOutput (const GLScreenPaintAttrib &attrib,
1288 1288 SHIFT_WINDOW (w);
1289 1289  
1290 1290 sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform,
1291   - infiniteRegion, 0);
  1291 + CompRegion::infinite (), 0);
1292 1292 }
1293 1293  
1294 1294 mPaintingAbove = false;
... ...
plugins/stackswitch/src/stackswitch.cpp
... ... @@ -380,7 +380,7 @@ StackswitchWindow::glPaint (const GLWindowPaintAttrib &attrib,
380 380 matl.push_back (matrix);
381 381  
382 382 gWindow->geometry ().reset ();
383   - gWindow->glAddGeometry (matl, iconReg, infiniteRegion);
  383 + gWindow->glAddGeometry (matl, iconReg, CompRegion::infinite ());
384 384  
385 385 if (gWindow->geometry ().vCount)
386 386 {
... ... @@ -888,7 +888,7 @@ StackswitchScreen::glPaintOutput (const GLScreenPaintAttrib &attrib,
888 888  
889 889 STACKSWITCH_WINDOW (w);
890 890  
891   - sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform, infiniteRegion, 0);
  891 + sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform, CompRegion::infinite (), 0);
892 892 }
893 893 }
894 894  
... ...
plugins/staticswitcher/src/staticswitcher.cpp
... ... @@ -965,7 +965,7 @@ StaticSwitchScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
965 965 sw->cWindow->damaged ())
966 966 {
967 967 sw->gWindow->glPaint (sw->gWindow->paintAttrib (),
968   - sTransform, infiniteRegion, 0);
  968 + sTransform, CompRegion::infinite (), 0);
969 969 }
970 970 }
971 971 }
... ...
plugins/switcher/src/switcher.cpp
... ... @@ -790,7 +790,7 @@ SwitchScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
790 790 sw->cWindow->damaged ())
791 791 {
792 792 sw->gWindow->glPaint (sw->gWindow->paintAttrib (),
793   - sTransform, infiniteRegion, 0);
  793 + sTransform, CompRegion::infinite (), 0);
794 794 }
795 795 }
796 796 }
... ...
plugins/td/src/3d.cpp
... ... @@ -458,7 +458,7 @@ TdScreen::cubePaintViewport (const GLScreenPaintAttrib &attrib,
458 458  
459 459 GL::shaders = false;
460 460 tdw->gWindow->glPaint (tdw->gWindow->paintAttrib (), mTransform,
461   - infiniteRegion, newMask);
  461 + CompRegion::infinite (), newMask);
462 462 GL::shaders = true;
463 463  
464 464 gScreen->glDisableOutputClipping ();
... ...
plugins/thumbnail/src/thumbnail.cpp
... ... @@ -908,7 +908,7 @@ ThumbScreen::thumbPaintThumb (Thumbnail *t,
908 908 very ugly but necessary until the vertex stage has been made
909 909 fully pluggable. */
910 910 gWindow->glAddGeometrySetCurrentIndex (MAXSHORT);
911   - gWindow->glDraw (wTransform, sAttrib, infiniteRegion, mask);
  911 + gWindow->glDraw (wTransform, sAttrib, CompRegion::infinite (), mask);
912 912  
913 913 gScreen->setTextureFilter (filter);
914 914 }
... ...
plugins/wallpaper/src/wallpaper.cpp
... ... @@ -450,7 +450,7 @@ WallpaperWindow::drawBackgrounds (const GLMatrix &transform,
450 450  
451 451 gWindow->glAddGeometry (tmpMatrixList, screen->region (),
452 452 (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
453   - infiniteRegion : region);
  453 + CompRegion::infinite () : region);
454 454  
455 455 if (ws->optionGetCycleWallpapers ())
456 456 tmpAttrib.opacity *= fadingIn ? (1.0f - ws->alpha) : ws->alpha;
... ...
src/region/include/core/region.h
... ... @@ -52,6 +52,9 @@ class CompRegion {
52 52 CompRegion (const CompRect &);
53 53 ~CompRegion ();
54 54  
  55 + static const CompRegion &infinite();
  56 + static const CompRegion &empty();
  57 +
55 58 /**
56 59 * Returns a CompRect which encapsulates a given CompRegion
57 60 */
... ... @@ -193,7 +196,4 @@ class CompRegionRef : public CompRegion
193 196 ~CompRegionRef ();
194 197 };
195 198  
196   -extern const CompRegion infiniteRegion;
197   -extern const CompRegion emptyRegion;
198   -
199 199 #endif
... ...
src/region/src/region.cpp
... ... @@ -38,19 +38,21 @@
38 38  
39 39 template class std::vector<CompRegion>;
40 40  
41   -const CompRegion infiniteRegion (CompRect (MINSHORT, MINSHORT,
42   - MAXSHORT * 2, MAXSHORT * 2));
43   -const CompRegion emptyRegion;
44   -
45   -/* Alternate emptyRegion, mostly just required to construct infiniteRegion
46   - when emptyRegion may still be uninitialized */
47   -static const CompRegion &
48   -_emptyRegion ()
  41 +const CompRegion &
  42 +CompRegion::empty ()
49 43 {
50 44 static const CompRegion r;
51 45 return r;
52 46 }
53 47  
  48 +const CompRegion &
  49 +CompRegion::infinite ()
  50 +{
  51 + static const CompRegion r(CompRect (MINSHORT, MINSHORT,
  52 + MAXSHORT * 2, MAXSHORT * 2));
  53 + return r;
  54 +}
  55 +
54 56 CompRegion::CompRegion ()
55 57 {
56 58 init ();
... ... @@ -59,7 +61,7 @@ CompRegion::CompRegion ()
59 61 CompRegion::CompRegion (const CompRegion &c)
60 62 {
61 63 init ();
62   - XUnionRegion (_emptyRegion ().handle (), c.handle (), handle ());
  64 + XUnionRegion (empty ().handle (), c.handle (), handle ());
63 65 }
64 66  
65 67 CompRegion::CompRegion ( int x, int y, int w, int h)
... ... @@ -73,7 +75,7 @@ CompRegion::CompRegion ( int x, int y, int w, int h)
73 75 rect.width = w;
74 76 rect.height = h;
75 77  
76   - XUnionRectWithRegion (&rect, _emptyRegion ().handle (), handle ());
  78 + XUnionRectWithRegion (&rect, empty ().handle (), handle ());
77 79 }
78 80  
79 81 CompRegion::CompRegion (const CompRect &r)
... ... @@ -87,7 +89,7 @@ CompRegion::CompRegion (const CompRect &amp;r)
87 89 rect.width = r.width ();
88 90 rect.height = r.height ();
89 91  
90   - XUnionRectWithRegion (&rect, _emptyRegion ().handle (), handle ());
  92 + XUnionRectWithRegion (&rect, empty ().handle (), handle ());
91 93 }
92 94  
93 95 CompRegion::CompRegion (Region external)
... ... @@ -129,7 +131,7 @@ CompRegion::handle () const
129 131 CompRegion &
130 132 CompRegion::operator= (const CompRegion &c)
131 133 {
132   - XUnionRegion (emptyRegion.handle (), c.handle (), handle ());
  134 + XUnionRegion (empty ().handle (), c.handle (), handle ());
133 135 return *this;
134 136 }
135 137  
... ...
src/window.cpp
... ... @@ -950,7 +950,7 @@ PrivateWindow::updateRegion ()
950 950 const CompWindow::Geometry &geom = attrib.override_redirect ?
951 951 priv->geometry : priv->serverGeometry;
952 952  
953   - priv->region = priv->inputRegion = emptyRegion;
  953 + priv->region = priv->inputRegion = CompRegion::empty ();
954 954  
955 955 r.x = -geom.border ();
956 956 r.y = -geom.border ();
... ... @@ -6658,7 +6658,7 @@ CompWindow::updateFrameRegion ()
6658 6658 {
6659 6659 if (priv->serverFrame)
6660 6660 {
6661   - priv->frameRegion = emptyRegion;
  6661 + priv->frameRegion = CompRegion::empty ();
6662 6662  
6663 6663 updateFrameRegion (priv->frameRegion);
6664 6664  
... ...