Merge lp:~unity-team/compiz/x-sru6 into lp:compiz/xenial

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 4021
Proposed branch: lp:~unity-team/compiz/x-sru6
Merge into: lp:compiz/xenial
Diff against target: 561 lines (+63/-54)
30 files modified
debian/changelog (+7/-0)
include/core/abiversion.h (+1/-1)
plugins/animationaddon/src/beamup.cpp (+1/-1)
plugins/animationaddon/src/burn.cpp (+1/-1)
plugins/animationaddon/src/particle.cpp (+1/-1)
plugins/blur/src/blur.cpp (+2/-2)
plugins/compiztoolbox/src/compiztoolbox.cpp (+2/-2)
plugins/composite/src/backbuffertracking/tests/test-composite-backbuffertracking.cpp (+5/-5)
plugins/decor/src/clip-groups/src/clip-groups.cpp (+2/-2)
plugins/decor/src/decor.cpp (+1/-1)
plugins/expo/src/expo.cpp (+1/-1)
plugins/group/src/paint.cpp (+1/-1)
plugins/group/src/selection.cpp (+1/-1)
plugins/group/src/tab.cpp (+1/-1)
plugins/imgsvg/src/imgsvg.cpp (+1/-1)
plugins/kdecompat/src/kdecompat.cpp (+2/-2)
plugins/opacify/src/opacify.cpp (+1/-1)
plugins/opengl/src/paint.cpp (+1/-1)
plugins/resize/src/logic/src/resize-logic.cpp (+1/-1)
plugins/ring/src/ring.cpp (+1/-1)
plugins/shift/src/shift.cpp (+3/-3)
plugins/stackswitch/src/stackswitch.cpp (+2/-2)
plugins/staticswitcher/src/staticswitcher.cpp (+1/-1)
plugins/switcher/src/switcher.cpp (+1/-1)
plugins/td/src/3d.cpp (+1/-1)
plugins/thumbnail/src/thumbnail.cpp (+1/-1)
plugins/wallpaper/src/wallpaper.cpp (+1/-1)
src/region/include/core/region.h (+3/-3)
src/region/src/region.cpp (+14/-12)
src/window.cpp (+2/-2)
To merge this branch: bzr merge lp:~unity-team/compiz/x-sru6
Reviewer Review Type Date Requested Status
Andrea Azzarone Approve
Review via email: mp+338345@code.launchpad.net

This proposal supersedes a proposal from 2018-02-20.

Commit message

Releasing Xenial Compiz SRU6

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

LGTM.

review: Approve
lp:~unity-team/compiz/x-sru6 updated
4021. By Marco Trevisan (Treviño)

Region: define static const functions returning infinite and empty regions

See https://gcc.gnu.org/ml/gcc-help/2010-10/msg00255.html

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-11-16 23:00:54 +0000
3+++ debian/changelog 2018-02-21 17:40:02 +0000
4@@ -1,3 +1,10 @@
5+compiz (1:0.9.12.3+16.04.20171116-0ubuntu2) UNRELEASED; urgency=medium
6+
7+ * Region: define static const functions returning infinite and empty
8+ regions (LP: #1750619)
9+
10+ -- Marco Trevisan (Treviño) <mail@3v1n0.net> Wed, 21 Feb 2018 18:20:59 +0100
11+
12 compiz (1:0.9.12.3+16.04.20171116-0ubuntu1) xenial; urgency=medium
13
14 [ Eleni Maria Stea ]
15
16=== modified file 'include/core/abiversion.h'
17--- include/core/abiversion.h 2017-07-03 15:21:08 +0000
18+++ include/core/abiversion.h 2018-02-21 17:40:02 +0000
19@@ -5,6 +5,6 @@
20 # error Conflicting definitions of CORE_ABIVERSION
21 #endif
22
23-#define CORE_ABIVERSION 20170630
24+#define CORE_ABIVERSION 20180221
25
26 #endif // COMPIZ_ABIVERSION_H
27
28=== modified file 'plugins/animationaddon/src/beamup.cpp'
29--- plugins/animationaddon/src/beamup.cpp 2013-02-27 11:33:10 +0000
30+++ plugins/animationaddon/src/beamup.cpp 2018-02-21 17:40:02 +0000
31@@ -181,7 +181,7 @@
32 }
33 else
34 {
35- mDrawRegion = emptyRegion;
36+ mDrawRegion = CompRegion::empty ();
37 }
38
39 mUseDrawRegion = (fabs (newProgress) > 1e-5);
40
41=== modified file 'plugins/animationaddon/src/burn.cpp'
42--- plugins/animationaddon/src/burn.cpp 2013-02-27 11:33:10 +0000
43+++ plugins/animationaddon/src/burn.cpp 2018-02-21 17:40:02 +0000
44@@ -326,7 +326,7 @@
45 }
46 else
47 {
48- mDrawRegion = emptyRegion;
49+ mDrawRegion = CompRegion::empty ();
50 }
51 mUseDrawRegion = (fabs (newProgress) > 1e-5);
52
53
54=== modified file 'plugins/animationaddon/src/particle.cpp'
55--- plugins/animationaddon/src/particle.cpp 2013-02-27 11:33:10 +0000
56+++ plugins/animationaddon/src/particle.cpp 2018-02-21 17:40:02 +0000
57@@ -285,7 +285,7 @@
58 }
59 }
60
61- if (mUseDrawRegion && mDrawRegion != emptyRegion)
62+ if (mUseDrawRegion && mDrawRegion != CompRegion::empty ())
63 // expand BB with bounding box of draw region
64 mAWindow->expandBBWithBox (mDrawRegion.handle ()->extents);
65 else // drawing full window
66
67=== modified file 'plugins/blur/src/blur.cpp'
68--- plugins/blur/src/blur.cpp 2013-05-09 13:43:07 +0000
69+++ plugins/blur/src/blur.cpp 2018-02-21 17:40:02 +0000
70@@ -1234,7 +1234,7 @@
71 GLWindow::Geometry *gm;
72
73 gWindow->geometry ().reset ();
74- gWindow->glAddGeometry (ml, bScreen->tmpRegion2, infiniteRegion);
75+ gWindow->glAddGeometry (ml, bScreen->tmpRegion2, CompRegion::infinite ());
76
77 if (!gWindow->geometry ().vCount)
78 return;
79@@ -1609,7 +1609,7 @@
80 bScreen->mvp *= transform;
81
82 if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
83- reg = infiniteRegion;
84+ reg = CompRegion::infinite ();
85 else
86 reg = region;
87
88
89=== modified file 'plugins/compiztoolbox/src/compiztoolbox.cpp'
90--- plugins/compiztoolbox/src/compiztoolbox.cpp 2015-08-22 21:46:01 +0000
91+++ plugins/compiztoolbox/src/compiztoolbox.cpp 2018-02-21 17:40:02 +0000
92@@ -504,7 +504,7 @@
93 very ugly but necessary until the vertex stage has been made
94 fully pluggable. */
95 gWindow->glAddGeometrySetCurrentIndex (MAXSHORT);
96- gWindow->glDraw (wTransform, sAttrib, infiniteRegion, mask);
97+ gWindow->glDraw (wTransform, sAttrib, CompRegion::infinite (), mask);
98 gWindow->glAddGeometrySetCurrentIndex (addWindowGeometryIndex);
99
100 gScreen->setTextureFilter (filter);
101@@ -552,7 +552,7 @@
102 gWindow->vertexBuffer ()->begin ();
103
104 gWindow->glAddGeometrySetCurrentIndex (MAXSHORT);
105- gWindow->glAddGeometry (matrix, iconReg, infiniteRegion);
106+ gWindow->glAddGeometry (matrix, iconReg, CompRegion::infinite ());
107 gWindow->glAddGeometrySetCurrentIndex (addWindowGeometryIndex);
108
109 if (gWindow->vertexBuffer ()->end ())
110
111=== modified file 'plugins/composite/src/backbuffertracking/tests/test-composite-backbuffertracking.cpp'
112--- plugins/composite/src/backbuffertracking/tests/test-composite-backbuffertracking.cpp 2013-05-12 05:49:43 +0000
113+++ plugins/composite/src/backbuffertracking/tests/test-composite-backbuffertracking.cpp 2018-02-21 17:40:02 +0000
114@@ -181,7 +181,7 @@
115 allowDamage (false);
116 CompRegion damage (100, 100, 100, 100);
117 roster->dirtyAreaOnCurrentFrame (damage);
118- EXPECT_EQ (emptyRegion, roster->currentFrameDamage ());
119+ EXPECT_EQ (CompRegion::empty (), roster->currentFrameDamage ());
120 }
121
122 TEST_F (BackbufferTracking, DirtyAreaSubtraction)
123@@ -210,7 +210,7 @@
124 CompRegion all (0, 0, screen.width (), screen.height ());
125 roster->dirtyAreaOnCurrentFrame (all);
126 roster->incrementFrameAges ();
127- EXPECT_EQ (emptyRegion, roster->damageForFrameAge (1));
128+ EXPECT_EQ (CompRegion::empty (), roster->damageForFrameAge (1));
129 }
130
131 TEST_F (BackbufferTracking, DirtyAreaIfMoreSinceLastFrame)
132@@ -429,21 +429,21 @@
133 {
134 EXPECT_CALL (mockDamageAgeTracker, dirtyAreaOnCurrentFrame (_)).Times (0);
135 ageing.unobserve (mockDamageAgeTracker);
136- ageing.markAreaDirty (emptyRegion);
137+ ageing.markAreaDirty (CompRegion::empty ());
138 }
139
140 TEST_F (AgeingDamageBuffers, SubtractObscuredAreaOnInvalidRosters)
141 {
142 EXPECT_CALL (mockDamageAgeTracker, subtractObscuredArea (_)).Times (0);
143 ageing.unobserve (mockDamageAgeTracker);
144- ageing.subtractObscuredArea (emptyRegion);
145+ ageing.subtractObscuredArea (CompRegion::empty ());
146 }
147
148 TEST_F (AgeingDamageBuffers, AddOverdrawAreaOnInvalidRosters)
149 {
150 EXPECT_CALL (mockDamageAgeTracker, overdrawRegionOnPaintingFrame (_)).Times (0);
151 ageing.unobserve (mockDamageAgeTracker);
152- ageing.markAreaDirtyOnLastFrame (emptyRegion);
153+ ageing.markAreaDirtyOnLastFrame (CompRegion::empty ());
154 }
155
156
157
158=== modified file 'plugins/decor/src/clip-groups/src/clip-groups.cpp'
159--- plugins/decor/src/clip-groups/src/clip-groups.cpp 2012-03-30 14:29:18 +0000
160+++ plugins/decor/src/clip-groups/src/clip-groups.cpp 2018-02-21 17:40:02 +0000
161@@ -41,7 +41,7 @@
162 if (it != mClippables.end ())
163 {
164 dc->setOwner (NULL);
165- dc->updateShadow (emptyRegion);
166+ dc->updateShadow (CompRegion::empty ());
167 mClippables.erase (it);
168 regenerateClipRegion ();
169
170@@ -54,7 +54,7 @@
171 void
172 GenericDecorClipGroup::doRegenerateClipRegion ()
173 {
174- mRegion -= infiniteRegion;
175+ mRegion -= CompRegion::infinite ();
176
177 foreach (DecorClippableInterface *clippable, mClippables)
178 {
179
180=== modified file 'plugins/decor/src/decor.cpp'
181--- plugins/decor/src/decor.cpp 2015-09-01 08:50:37 +0000
182+++ plugins/decor/src/decor.cpp 2018-02-21 17:40:02 +0000
183@@ -253,7 +253,7 @@
184 PAINT_WINDOW_WITH_OFFSET_MASK)))
185 preg = &region;
186 else if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
187- preg = &infiniteRegion;
188+ preg = &CompRegion::infinite ();
189 else if (mClipGroup)
190 {
191 tmpRegion = mOutputRegion;
192
193=== modified file 'plugins/expo/src/expo.cpp'
194--- plugins/expo/src/expo.cpp 2016-08-18 18:53:01 +0000
195+++ plugins/expo/src/expo.cpp 2018-02-21 17:40:02 +0000
196@@ -1336,7 +1336,7 @@
197 /* reset geometry and paint */
198 gWindow->vertexBuffer ()->begin ();
199 gWindow->vertexBuffer ()->end ();
200- paintGlow (transform, attrib, infiniteRegion, mask);
201+ paintGlow (transform, attrib, CompRegion::infinite (), mask);
202 }
203
204 return status;
205
206=== modified file 'plugins/group/src/paint.cpp'
207--- plugins/group/src/paint.cpp 2012-07-30 09:53:16 +0000
208+++ plugins/group/src/paint.cpp 2018-02-21 17:40:02 +0000
209@@ -829,7 +829,7 @@
210 if (mGroup && (mGroup->mWindows.size () > 1) && mGlowQuads)
211 {
212 if (mask & PAINT_WINDOW_TRANSFORMED_MASK)
213- paintRegion = CompRegion (infiniteRegion);
214+ paintRegion = CompRegion (CompRegion::infinite ());
215
216 if (paintRegion.numRects ())
217 {
218
219=== modified file 'plugins/group/src/selection.cpp'
220--- plugins/group/src/selection.cpp 2012-12-04 15:34:01 +0000
221+++ plugins/group/src/selection.cpp 2018-02-21 17:40:02 +0000
222@@ -249,7 +249,7 @@
223 MIN (mY1, mY2) + 4;
224
225 rect = CompRect (x, y, width, height);
226- reg = emptyRegion.united (rect);
227+ reg = CompRegion::empty ().united (rect);
228
229 gs->cScreen->damageRegion (reg);
230
231
232=== modified file 'plugins/group/src/tab.cpp'
233--- plugins/group/src/tab.cpp 2013-03-26 22:02:39 +0000
234+++ plugins/group/src/tab.cpp 2018-02-21 17:40:02 +0000
235@@ -2015,7 +2015,7 @@
236 space = optionGetThumbSpace ();
237 thumbSize = optionGetThumbSize ();
238
239- slot->mRegion = emptyRegion;
240+ slot->mRegion = CompRegion::empty ();
241
242 /* Padding between slots, account for this */
243 box.setX (space + ((thumbSize + space) * slotPos));
244
245=== modified file 'plugins/imgsvg/src/imgsvg.cpp'
246--- plugins/imgsvg/src/imgsvg.cpp 2013-05-16 11:55:17 +0000
247+++ plugins/imgsvg/src/imgsvg.cpp 2018-02-21 17:40:02 +0000
248@@ -230,7 +230,7 @@
249 return status;
250
251 const CompRegion &reg = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
252- infiniteRegion : region;
253+ CompRegion::infinite () : region;
254
255 if (context && reg.numRects ())
256 {
257
258=== modified file 'plugins/kdecompat/src/kdecompat.cpp'
259--- plugins/kdecompat/src/kdecompat.cpp 2013-05-15 10:23:30 +0000
260+++ plugins/kdecompat/src/kdecompat.cpp 2018-02-21 17:40:02 +0000
261@@ -323,7 +323,7 @@
262 matrices[0].y0 -= (tw->y () * icon->matrix ().yy);
263
264 gtw->vertexBuffer ()->begin ();
265- gtw->glAddGeometry (matrices, tw->geometry (), infiniteRegion);
266+ gtw->glAddGeometry (matrices, tw->geometry (), CompRegion::infinite ());
267 gtw->vertexBuffer ()->end ();
268 }
269 }
270@@ -343,7 +343,7 @@
271
272 if (!gtw->textures ().empty ())
273 gtw->glDraw (wTransform, attrib,
274- infiniteRegion, paintMask);
275+ CompRegion::infinite (), paintMask);
276 else if (icon)
277 gtw->glDrawTexture (icon, wTransform, attrib, paintMask);
278 }
279
280=== modified file 'plugins/opacify/src/opacify.cpp'
281--- plugins/opacify/src/opacify.cpp 2013-12-03 11:12:32 +0000
282+++ plugins/opacify/src/opacify.cpp 2018-02-21 17:40:02 +0000
283@@ -407,7 +407,7 @@
284 isToggle (optionGetInitToggle ()),
285 newActive (NULL),
286 active (screen->activeWindow ()),
287- intersect (emptyRegion),
288+ intersect (CompRegion::empty ()),
289 justMoved (false)
290 {
291 ScreenInterface::setHandler (screen, false);
292
293=== modified file 'plugins/opengl/src/paint.cpp'
294--- plugins/opengl/src/paint.cpp 2016-05-17 02:52:07 +0000
295+++ plugins/opengl/src/paint.cpp 2018-02-21 17:40:02 +0000
296@@ -1324,7 +1324,7 @@
297 attrib, region, mask)
298
299 const CompRegion &reg = (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
300- infiniteRegion : region;
301+ CompRegion::infinite () : region;
302
303 if (reg.isEmpty ())
304 return true;
305
306=== modified file 'plugins/resize/src/logic/src/resize-logic.cpp'
307--- plugins/resize/src/logic/src/resize-logic.cpp 2017-07-03 15:20:51 +0000
308+++ plugins/resize/src/logic/src/resize-logic.cpp 2018-02-21 17:40:02 +0000
309@@ -1440,7 +1440,7 @@
310 lastGoodSize = w->serverSize ();
311
312 /* Combine the work areas of all outputs */
313- constraintRegion = emptyRegion;
314+ constraintRegion = CompRegion::empty ();
315 foreach (CompOutput &output, mScreen->outputDevs ())
316 constraintRegion += output.workArea ();
317 }
318
319=== modified file 'plugins/ring/src/ring.cpp'
320--- plugins/ring/src/ring.cpp 2013-05-15 10:23:30 +0000
321+++ plugins/ring/src/ring.cpp 2018-02-21 17:40:02 +0000
322@@ -768,7 +768,7 @@
323 RING_WINDOW (w);
324
325 status |= rw->gWindow->glPaint (rw->gWindow->paintAttrib (),
326- sTransform, infiniteRegion, 0);
327+ sTransform, CompRegion::infinite (), 0);
328 }
329
330 if (mState != RingStateIn)
331
332=== modified file 'plugins/shift/src/shift.cpp'
333--- plugins/shift/src/shift.cpp 2015-10-20 15:12:34 +0000
334+++ plugins/shift/src/shift.cpp 2018-02-21 17:40:02 +0000
335@@ -1155,7 +1155,7 @@
336 mActiveSlot = &mDrawSlots[i];
337 {
338 sw->gWindow->glPaint (sw->gWindow->paintAttrib (), rTransform,
339- infiniteRegion, 0);
340+ CompRegion::infinite (), 0);
341 }
342 }
343
344@@ -1248,7 +1248,7 @@
345 mActiveSlot = &mDrawSlots[i];
346 {
347 sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform,
348- infiniteRegion, 0);
349+ CompRegion::infinite (), 0);
350 }
351 }
352
353@@ -1288,7 +1288,7 @@
354 SHIFT_WINDOW (w);
355
356 sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform,
357- infiniteRegion, 0);
358+ CompRegion::infinite (), 0);
359 }
360
361 mPaintingAbove = false;
362
363=== modified file 'plugins/stackswitch/src/stackswitch.cpp'
364--- plugins/stackswitch/src/stackswitch.cpp 2013-05-11 09:30:49 +0000
365+++ plugins/stackswitch/src/stackswitch.cpp 2018-02-21 17:40:02 +0000
366@@ -380,7 +380,7 @@
367 matl.push_back (matrix);
368
369 gWindow->geometry ().reset ();
370- gWindow->glAddGeometry (matl, iconReg, infiniteRegion);
371+ gWindow->glAddGeometry (matl, iconReg, CompRegion::infinite ());
372
373 if (gWindow->geometry ().vCount)
374 {
375@@ -888,7 +888,7 @@
376
377 STACKSWITCH_WINDOW (w);
378
379- sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform, infiniteRegion, 0);
380+ sw->gWindow->glPaint (sw->gWindow->paintAttrib (), sTransform, CompRegion::infinite (), 0);
381 }
382 }
383
384
385=== modified file 'plugins/staticswitcher/src/staticswitcher.cpp'
386--- plugins/staticswitcher/src/staticswitcher.cpp 2015-08-22 21:46:01 +0000
387+++ plugins/staticswitcher/src/staticswitcher.cpp 2018-02-21 17:40:02 +0000
388@@ -965,7 +965,7 @@
389 sw->cWindow->damaged ())
390 {
391 sw->gWindow->glPaint (sw->gWindow->paintAttrib (),
392- sTransform, infiniteRegion, 0);
393+ sTransform, CompRegion::infinite (), 0);
394 }
395 }
396 }
397
398=== modified file 'plugins/switcher/src/switcher.cpp'
399--- plugins/switcher/src/switcher.cpp 2015-08-22 21:46:01 +0000
400+++ plugins/switcher/src/switcher.cpp 2018-02-21 17:40:02 +0000
401@@ -818,7 +818,7 @@
402 sw->cWindow->damaged ())
403 {
404 sw->gWindow->glPaint (sw->gWindow->paintAttrib (),
405- sTransform, infiniteRegion, 0);
406+ sTransform, CompRegion::infinite (), 0);
407 }
408 }
409 }
410
411=== modified file 'plugins/td/src/3d.cpp'
412--- plugins/td/src/3d.cpp 2015-08-05 05:57:15 +0000
413+++ plugins/td/src/3d.cpp 2018-02-21 17:40:02 +0000
414@@ -458,7 +458,7 @@
415
416 GL::shaders = false;
417 tdw->gWindow->glPaint (tdw->gWindow->paintAttrib (), mTransform,
418- infiniteRegion, newMask);
419+ CompRegion::infinite (), newMask);
420 GL::shaders = true;
421
422 gScreen->glDisableOutputClipping ();
423
424=== modified file 'plugins/thumbnail/src/thumbnail.cpp'
425--- plugins/thumbnail/src/thumbnail.cpp 2013-06-28 14:23:21 +0000
426+++ plugins/thumbnail/src/thumbnail.cpp 2018-02-21 17:40:02 +0000
427@@ -908,7 +908,7 @@
428 very ugly but necessary until the vertex stage has been made
429 fully pluggable. */
430 gWindow->glAddGeometrySetCurrentIndex (MAXSHORT);
431- gWindow->glDraw (wTransform, sAttrib, infiniteRegion, mask);
432+ gWindow->glDraw (wTransform, sAttrib, CompRegion::infinite (), mask);
433
434 gScreen->setTextureFilter (filter);
435 }
436
437=== modified file 'plugins/wallpaper/src/wallpaper.cpp'
438--- plugins/wallpaper/src/wallpaper.cpp 2013-05-15 22:15:41 +0000
439+++ plugins/wallpaper/src/wallpaper.cpp 2018-02-21 17:40:02 +0000
440@@ -450,7 +450,7 @@
441
442 gWindow->glAddGeometry (tmpMatrixList, screen->region (),
443 (mask & PAINT_WINDOW_TRANSFORMED_MASK) ?
444- infiniteRegion : region);
445+ CompRegion::infinite () : region);
446
447 if (ws->optionGetCycleWallpapers ())
448 tmpAttrib.opacity *= fadingIn ? (1.0f - ws->alpha) : ws->alpha;
449
450=== modified file 'src/region/include/core/region.h'
451--- src/region/include/core/region.h 2012-10-17 06:22:10 +0000
452+++ src/region/include/core/region.h 2018-02-21 17:40:02 +0000
453@@ -52,6 +52,9 @@
454 CompRegion (const CompRect &);
455 ~CompRegion ();
456
457+ static const CompRegion &infinite();
458+ static const CompRegion &empty();
459+
460 /**
461 * Returns a CompRect which encapsulates a given CompRegion
462 */
463@@ -193,7 +196,4 @@
464 ~CompRegionRef ();
465 };
466
467-extern const CompRegion infiniteRegion;
468-extern const CompRegion emptyRegion;
469-
470 #endif
471
472=== modified file 'src/region/src/region.cpp'
473--- src/region/src/region.cpp 2012-10-16 07:00:03 +0000
474+++ src/region/src/region.cpp 2018-02-21 17:40:02 +0000
475@@ -38,19 +38,21 @@
476
477 template class std::vector<CompRegion>;
478
479-const CompRegion infiniteRegion (CompRect (MINSHORT, MINSHORT,
480- MAXSHORT * 2, MAXSHORT * 2));
481-const CompRegion emptyRegion;
482-
483-/* Alternate emptyRegion, mostly just required to construct infiniteRegion
484- when emptyRegion may still be uninitialized */
485-static const CompRegion &
486-_emptyRegion ()
487+const CompRegion &
488+CompRegion::empty ()
489 {
490 static const CompRegion r;
491 return r;
492 }
493
494+const CompRegion &
495+CompRegion::infinite ()
496+{
497+ static const CompRegion r(CompRect (MINSHORT, MINSHORT,
498+ MAXSHORT * 2, MAXSHORT * 2));
499+ return r;
500+}
501+
502 CompRegion::CompRegion ()
503 {
504 init ();
505@@ -59,7 +61,7 @@
506 CompRegion::CompRegion (const CompRegion &c)
507 {
508 init ();
509- XUnionRegion (_emptyRegion ().handle (), c.handle (), handle ());
510+ XUnionRegion (empty ().handle (), c.handle (), handle ());
511 }
512
513 CompRegion::CompRegion ( int x, int y, int w, int h)
514@@ -73,7 +75,7 @@
515 rect.width = w;
516 rect.height = h;
517
518- XUnionRectWithRegion (&rect, _emptyRegion ().handle (), handle ());
519+ XUnionRectWithRegion (&rect, empty ().handle (), handle ());
520 }
521
522 CompRegion::CompRegion (const CompRect &r)
523@@ -87,7 +89,7 @@
524 rect.width = r.width ();
525 rect.height = r.height ();
526
527- XUnionRectWithRegion (&rect, _emptyRegion ().handle (), handle ());
528+ XUnionRectWithRegion (&rect, empty ().handle (), handle ());
529 }
530
531 CompRegion::CompRegion (Region external)
532@@ -129,7 +131,7 @@
533 CompRegion &
534 CompRegion::operator= (const CompRegion &c)
535 {
536- XUnionRegion (emptyRegion.handle (), c.handle (), handle ());
537+ XUnionRegion (empty ().handle (), c.handle (), handle ());
538 return *this;
539 }
540
541
542=== modified file 'src/window.cpp'
543--- src/window.cpp 2017-04-27 06:39:40 +0000
544+++ src/window.cpp 2018-02-21 17:40:02 +0000
545@@ -950,7 +950,7 @@
546 const CompWindow::Geometry &geom = attrib.override_redirect ?
547 priv->geometry : priv->serverGeometry;
548
549- priv->region = priv->inputRegion = emptyRegion;
550+ priv->region = priv->inputRegion = CompRegion::empty ();
551
552 r.x = -geom.border ();
553 r.y = -geom.border ();
554@@ -6658,7 +6658,7 @@
555 {
556 if (priv->serverFrame)
557 {
558- priv->frameRegion = emptyRegion;
559+ priv->frameRegion = CompRegion::empty ();
560
561 updateFrameRegion (priv->frameRegion);
562

Subscribers

People subscribed via source and target branches

to all changes: