Merge lp:~compiz-team/compiz/compiz.fix_1198000.update-tests.1 into lp:compiz/0.9.10
- compiz.fix_1198000.update-tests.1
- Merge into 0.9.10
Status: | Merged |
---|---|
Approved by: | Sam Spilsbury |
Approved revision: | 3757 |
Merged at revision: | 3765 |
Proposed branch: | lp:~compiz-team/compiz/compiz.fix_1198000.update-tests.1 |
Merge into: | lp:compiz/0.9.10 |
Prerequisite: | lp:~azzar1/compiz/fix-1198000 |
Diff against target: |
725 lines (+333/-75) 5 files modified
plugins/decor/src/decor.cpp (+6/-4) plugins/decor/tests/acceptance/xorg-gtest/CMakeLists.txt (+1/-0) plugins/decor/tests/acceptance/xorg-gtest/compiz_decor_acceptance_tests.cpp (+297/-66) src/privatewindow.h (+1/-0) src/window.cpp (+28/-5) |
To merge this branch: | bzr merge lp:~compiz-team/compiz/compiz.fix_1198000.update-tests.1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Sam Spilsbury | Approve | ||
Andrea Azzarone | Approve | ||
Review via email: mp+174649@code.launchpad.net |
This proposal supersedes a proposal from 2013-07-15.
Commit message
Adjust acceptance tests for the fix to LP: #1198000
1. Always set frame extents before updating the frame
2. Added COMPIZ_
with the delayed configure requests logic in the tests where it
does not help
3. Split restoredDecorat
and restoredDecorat
the decoration both in terms of its visible and invisible border
4. Wait for the default decoration properly
5. Capture the initial geometry of the window with and without decorations
when the window gets its first decoration. Use these values to calculate
the size changes in the window from then on instead of its creation
values
6. Just flag when the window was first decorated in setWindowFrameE
rather than checking if it is mapped. We only want to not resize
the window once.
Description of the change
Adjust acceptance tests for the fix to LP: #1198000
1. Always set frame extents before updating the frame
2. Added COMPIZ_
with the delayed configure requests logic in the tests where it
does not help
3. Split restoredDecorat
and restoredDecorat
the decoration both in terms of its visible and invisible border
4. Wait for the default decoration properly
5. Capture the initial geometry of the window with and without decorations
when the window gets its first decoration. Use these values to calculate
the size changes in the window from then on instead of its creation
values
6. Just flag when the window was first decorated in setWindowFrameE
rather than checking if it is mapped. We only want to not resize
the window once.
PS Jenkins bot (ps-jenkins) wrote : | # |
Andrea Azzarone (azzar1) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3756
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
- 3757. By Sam Spilsbury
-
Merge lp:compiz
Sam Spilsbury (smspillaz) : | # |
PS Jenkins bot (ps-jenkins) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3757
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'plugins/decor/src/decor.cpp' | |||
2 | --- plugins/decor/src/decor.cpp 2013-06-28 01:10:57 +0000 | |||
3 | +++ plugins/decor/src/decor.cpp 2013-07-19 04:17:27 +0000 | |||
4 | @@ -1651,14 +1651,16 @@ | |||
5 | 1651 | CompWindowExtents emptyExtents; | 1651 | CompWindowExtents emptyExtents; |
6 | 1652 | wd = NULL; | 1652 | wd = NULL; |
7 | 1653 | 1653 | ||
8 | 1654 | /* _NET_FRAME_EXTENTS should be updated before the frame | ||
9 | 1655 | * atom is */ | ||
10 | 1656 | memset (&emptyExtents, 0, sizeof (CompWindowExtents)); | ||
11 | 1657 | |||
12 | 1658 | window->setWindowFrameExtents (&emptyExtents, &emptyExtents); | ||
13 | 1659 | |||
14 | 1654 | /* Undecorated windows need to have the | 1660 | /* Undecorated windows need to have the |
15 | 1655 | * input and output frame removed and the | 1661 | * input and output frame removed and the |
16 | 1656 | * frame window geometry reset */ | 1662 | * frame window geometry reset */ |
17 | 1657 | updateFrame (); | 1663 | updateFrame (); |
18 | 1658 | |||
19 | 1659 | memset (&emptyExtents, 0, sizeof (CompWindowExtents)); | ||
20 | 1660 | |||
21 | 1661 | window->setWindowFrameExtents (&emptyExtents, &emptyExtents); | ||
22 | 1662 | } | 1664 | } |
23 | 1663 | 1665 | ||
24 | 1664 | /* We need to damage the current output extents | 1666 | /* We need to damage the current output extents |
25 | 1665 | 1667 | ||
26 | === modified file 'plugins/decor/tests/acceptance/xorg-gtest/CMakeLists.txt' | |||
27 | --- plugins/decor/tests/acceptance/xorg-gtest/CMakeLists.txt 2013-06-28 21:07:41 +0000 | |||
28 | +++ plugins/decor/tests/acceptance/xorg-gtest/CMakeLists.txt 2013-07-19 04:17:27 +0000 | |||
29 | @@ -22,6 +22,7 @@ | |||
30 | 22 | decoration | 22 | decoration |
31 | 23 | compiz_point | 23 | compiz_point |
32 | 24 | compiz_size | 24 | compiz_size |
33 | 25 | compiz_rect | ||
34 | 25 | ${GMOCK_LIBRARY} | 26 | ${GMOCK_LIBRARY} |
35 | 26 | ${GMOCK_MAIN_LIBRARY} | 27 | ${GMOCK_MAIN_LIBRARY} |
36 | 27 | ${GTEST_BOTH_LIBRARIES} | 28 | ${GTEST_BOTH_LIBRARIES} |
37 | 28 | 29 | ||
38 | === modified file 'plugins/decor/tests/acceptance/xorg-gtest/compiz_decor_acceptance_tests.cpp' | |||
39 | --- plugins/decor/tests/acceptance/xorg-gtest/compiz_decor_acceptance_tests.cpp 2013-06-29 07:07:12 +0000 | |||
40 | +++ plugins/decor/tests/acceptance/xorg-gtest/compiz_decor_acceptance_tests.cpp 2013-07-19 04:17:27 +0000 | |||
41 | @@ -38,10 +38,13 @@ | |||
42 | 38 | 38 | ||
43 | 39 | #include <core/point.h> | 39 | #include <core/point.h> |
44 | 40 | #include <core/size.h> | 40 | #include <core/size.h> |
45 | 41 | #include <core/rect.h> | ||
46 | 41 | 42 | ||
47 | 42 | #include <xorg/gtest/xorg-gtest.h> | 43 | #include <xorg/gtest/xorg-gtest.h> |
48 | 43 | #include <compiz-xorg-gtest.h> | 44 | #include <compiz-xorg-gtest.h> |
49 | 44 | 45 | ||
50 | 46 | #include <gtest_shared_tmpenv.h> | ||
51 | 47 | |||
52 | 45 | namespace xt = xorg::testing; | 48 | namespace xt = xorg::testing; |
53 | 46 | namespace ct = compiz::testing; | 49 | namespace ct = compiz::testing; |
54 | 47 | 50 | ||
55 | @@ -83,6 +86,8 @@ | |||
56 | 83 | Atom mDecorationInputFrameAtom; | 86 | Atom mDecorationInputFrameAtom; |
57 | 84 | Atom mDecorationOutputFrameAtom; | 87 | Atom mDecorationOutputFrameAtom; |
58 | 85 | 88 | ||
59 | 89 | TmpEnv mDisableConfigureBufferLocksEnv; | ||
60 | 90 | |||
61 | 86 | private: | 91 | private: |
62 | 87 | 92 | ||
63 | 88 | int GetEventMask () const; | 93 | int GetEventMask () const; |
64 | @@ -96,7 +101,10 @@ | |||
65 | 96 | mDecorationTypePixmap (0), | 101 | mDecorationTypePixmap (0), |
66 | 97 | mDecorationTypeWindow (0), | 102 | mDecorationTypeWindow (0), |
67 | 98 | mDecorationInputFrameAtom (0), | 103 | mDecorationInputFrameAtom (0), |
69 | 99 | mDecorationOutputFrameAtom (0) | 104 | mDecorationOutputFrameAtom (0), |
70 | 105 | /* Disable configure buffer locks as they cause event delivery indeterminacy | ||
71 | 106 | * that isn't useful for a testing environment */ | ||
72 | 107 | mDisableConfigureBufferLocksEnv ("COMPIZ_NO_CONFIGURE_BUFFER_LOCKS", "1") | ||
73 | 100 | { | 108 | { |
74 | 101 | } | 109 | } |
75 | 102 | 110 | ||
76 | @@ -256,7 +264,8 @@ | |||
77 | 256 | unsigned int actions) const; | 264 | unsigned int actions) const; |
78 | 257 | 265 | ||
79 | 258 | virtual CompPoint restoredFrameWindowOffset () const = 0; | 266 | virtual CompPoint restoredFrameWindowOffset () const = 0; |
81 | 259 | virtual CompSize restoredDecorationSize () const = 0; | 267 | virtual CompSize restoredDecorationBorderSize () const = 0; |
82 | 268 | virtual CompSize restoredDecorationInputSize () const = 0; | ||
83 | 260 | 269 | ||
84 | 261 | protected: | 270 | protected: |
85 | 262 | 271 | ||
86 | @@ -290,7 +299,8 @@ | |||
87 | 290 | size_t propertyDataSize () const; | 299 | size_t propertyDataSize () const; |
88 | 291 | void addPropertyData (std::vector<long> &) const; | 300 | void addPropertyData (std::vector<long> &) const; |
89 | 292 | CompPoint restoredFrameWindowOffset () const; | 301 | CompPoint restoredFrameWindowOffset () const; |
91 | 293 | CompSize restoredDecorationSize () const; | 302 | CompSize restoredDecorationBorderSize () const; |
92 | 303 | CompSize restoredDecorationInputSize () const; | ||
93 | 294 | 304 | ||
94 | 295 | static const unsigned int WindowDecorationSize = 8; | 305 | static const unsigned int WindowDecorationSize = 8; |
95 | 296 | 306 | ||
96 | @@ -323,7 +333,8 @@ | |||
97 | 323 | void changeRestoredInput (const decor_extents_t &input); | 333 | void changeRestoredInput (const decor_extents_t &input); |
98 | 324 | 334 | ||
99 | 325 | CompPoint restoredFrameWindowOffset () const; | 335 | CompPoint restoredFrameWindowOffset () const; |
101 | 326 | CompSize restoredDecorationSize () const; | 336 | CompSize restoredDecorationBorderSize () const; |
102 | 337 | CompSize restoredDecorationInputSize () const; | ||
103 | 327 | 338 | ||
104 | 328 | protected: | 339 | protected: |
105 | 329 | 340 | ||
106 | @@ -619,12 +630,18 @@ | |||
107 | 619 | } | 630 | } |
108 | 620 | 631 | ||
109 | 621 | CompSize | 632 | CompSize |
111 | 622 | cdt::FakeWindowTypeDecoration::restoredDecorationSize () const | 633 | cdt::FakeWindowTypeDecoration::restoredDecorationBorderSize () const |
112 | 623 | { | 634 | { |
113 | 624 | return CompSize (mRestored.left + mRestored.right, | 635 | return CompSize (mRestored.left + mRestored.right, |
114 | 625 | mRestored.top + mRestored.bottom); | 636 | mRestored.top + mRestored.bottom); |
115 | 626 | } | 637 | } |
116 | 627 | 638 | ||
117 | 639 | CompSize | ||
118 | 640 | cdt::FakeWindowTypeDecoration::restoredDecorationInputSize () const | ||
119 | 641 | { | ||
120 | 642 | return restoredDecorationBorderSize (); | ||
121 | 643 | } | ||
122 | 644 | |||
123 | 628 | cdt::FakePixmapTypeDecoration::FakePixmapTypeDecoration (unsigned int type, | 645 | cdt::FakePixmapTypeDecoration::FakePixmapTypeDecoration (unsigned int type, |
124 | 629 | unsigned int state, | 646 | unsigned int state, |
125 | 630 | unsigned int actions, | 647 | unsigned int actions, |
126 | @@ -713,7 +730,14 @@ | |||
127 | 713 | } | 730 | } |
128 | 714 | 731 | ||
129 | 715 | CompSize | 732 | CompSize |
131 | 716 | cdt::FakePixmapTypeDecoration::restoredDecorationSize () const | 733 | cdt::FakePixmapTypeDecoration::restoredDecorationBorderSize () const |
132 | 734 | { | ||
133 | 735 | return CompSize (mRestoredBorder.left + mRestoredBorder.right, | ||
134 | 736 | mRestoredBorder.top + mRestoredBorder.bottom); | ||
135 | 737 | } | ||
136 | 738 | |||
137 | 739 | CompSize | ||
138 | 740 | cdt::FakePixmapTypeDecoration::restoredDecorationInputSize () const | ||
139 | 717 | { | 741 | { |
140 | 718 | return CompSize (mRestoredInput.left + mRestoredInput.right, | 742 | return CompSize (mRestoredInput.left + mRestoredInput.right, |
141 | 719 | mRestoredInput.top + mRestoredInput.bottom); | 743 | mRestoredInput.top + mRestoredInput.bottom); |
142 | @@ -1314,6 +1338,11 @@ | |||
143 | 1314 | 1338 | ||
144 | 1315 | protected: | 1339 | protected: |
145 | 1316 | 1340 | ||
146 | 1341 | cdt::FakeDecoration::Ptr defaultActiveDecoration (); | ||
147 | 1342 | |||
148 | 1343 | cdt::FakeDecoration::Ptr rootActiveDecoration; | ||
149 | 1344 | cdt::FakeDecoration::Ptr rootBareDecoration; | ||
150 | 1345 | |||
151 | 1317 | cdt::FakeDecorationList rootActiveDecorationList; | 1346 | cdt::FakeDecorationList rootActiveDecorationList; |
152 | 1318 | cdt::FakeDecorationList rootBareDecorationList; | 1347 | cdt::FakeDecorationList rootBareDecorationList; |
153 | 1319 | 1348 | ||
154 | @@ -1484,7 +1513,7 @@ | |||
155 | 1484 | 1513 | ||
156 | 1485 | decor_extents_t emptyExtents (DecorationExtents (0, 0, 0, 0)); | 1514 | decor_extents_t emptyExtents (DecorationExtents (0, 0, 0, 0)); |
157 | 1486 | 1515 | ||
159 | 1487 | cdt::FakeDecoration::Ptr rootActiveDecoration = | 1516 | rootActiveDecoration = |
160 | 1488 | MakeFakePixmapTypeDecoration (DECOR_WINDOW_TYPE_NORMAL, | 1517 | MakeFakePixmapTypeDecoration (DECOR_WINDOW_TYPE_NORMAL, |
161 | 1489 | 0, | 1518 | 0, |
162 | 1490 | 0, | 1519 | 0, |
163 | @@ -1495,7 +1524,7 @@ | |||
164 | 1495 | activeInputMaximized, | 1524 | activeInputMaximized, |
165 | 1496 | Display ()); | 1525 | Display ()); |
166 | 1497 | 1526 | ||
168 | 1498 | cdt::FakeDecoration::Ptr rootBareDecoration = | 1527 | rootBareDecoration = |
169 | 1499 | MakeFakePixmapTypeDecoration (0, 0, 0, | 1528 | MakeFakePixmapTypeDecoration (0, 0, 0, |
170 | 1500 | 1, 1, | 1529 | 1, 1, |
171 | 1501 | emptyExtents, | 1530 | emptyExtents, |
172 | @@ -1519,10 +1548,15 @@ | |||
173 | 1519 | DecorWithPixmapDefaultsAcceptance::TearDown () | 1548 | DecorWithPixmapDefaultsAcceptance::TearDown () |
174 | 1520 | { | 1549 | { |
175 | 1521 | /* Remove inserted decorations */ | 1550 | /* Remove inserted decorations */ |
180 | 1522 | rootActiveDecorationList.RemoveDecoration (DECOR_WINDOW_TYPE_NORMAL, | 1551 | rootActiveDecorationList.RemoveAllDecorations (); |
181 | 1523 | 0, | 1552 | rootBareDecorationList.RemoveAllDecorations (); |
182 | 1524 | 0); | 1553 | |
183 | 1525 | rootBareDecorationList.RemoveDecoration (0, 0, 0); | 1554 | /* This is a bit of a kludge, but we also need to reset |
184 | 1555 | * the two decorations manually before TearDown. We can | ||
185 | 1556 | * probably fix this later by encapsulating it all in one | ||
186 | 1557 | * class, but that's a bit of an effort */ | ||
187 | 1558 | rootActiveDecoration.reset (); | ||
188 | 1559 | rootBareDecoration.reset (); | ||
189 | 1526 | 1560 | ||
190 | 1527 | DecorFakeDecoratorAcceptance::TearDown (); | 1561 | DecorFakeDecoratorAcceptance::TearDown (); |
191 | 1528 | } | 1562 | } |
192 | @@ -1644,6 +1678,8 @@ | |||
193 | 1644 | typedef cdt::FakeDecoration::Ptr FakeDecorPtr; | 1678 | typedef cdt::FakeDecoration::Ptr FakeDecorPtr; |
194 | 1645 | typedef cdt::FakePixmapTypeDecoration::Ptr FakePixDecorPtr; | 1679 | typedef cdt::FakePixmapTypeDecoration::Ptr FakePixDecorPtr; |
195 | 1646 | 1680 | ||
196 | 1681 | virtual void TearDown (); | ||
197 | 1682 | |||
198 | 1647 | Window CreateDecoratableWindow (::Display *display); | 1683 | Window CreateDecoratableWindow (::Display *display); |
199 | 1648 | Window MapAndReparent (::Display *display, | 1684 | Window MapAndReparent (::Display *display, |
200 | 1649 | Window window); | 1685 | Window window); |
201 | @@ -1654,6 +1690,10 @@ | |||
202 | 1654 | void WaitForDecoration (::Display *display, | 1690 | void WaitForDecoration (::Display *display, |
203 | 1655 | Window window, | 1691 | Window window, |
204 | 1656 | const FakeDecorPtr &decoration); | 1692 | const FakeDecorPtr &decoration); |
205 | 1693 | void WaitForDefaultDecoration (::Display *display, | ||
206 | 1694 | Window window, | ||
207 | 1695 | CompRect &testFrameDecorationGeometry, | ||
208 | 1696 | CompRect &testWindowDecorationGeometry); | ||
209 | 1657 | void WaitForDecorationUpdate (::Display *display, | 1697 | void WaitForDecorationUpdate (::Display *display, |
210 | 1658 | Window window, | 1698 | Window window, |
211 | 1659 | const FakeDecorPtr &decor); | 1699 | const FakeDecorPtr &decor); |
212 | @@ -1678,6 +1718,14 @@ | |||
213 | 1678 | std::map <Window, Window> windowParents; | 1718 | std::map <Window, Window> windowParents; |
214 | 1679 | }; | 1719 | }; |
215 | 1680 | 1720 | ||
216 | 1721 | void | ||
217 | 1722 | PixmapDecoratorAcceptance::TearDown () | ||
218 | 1723 | { | ||
219 | 1724 | windowDecorations.clear (); | ||
220 | 1725 | |||
221 | 1726 | DecorWithPixmapDefaultsAcceptance::TearDown (); | ||
222 | 1727 | } | ||
223 | 1728 | |||
224 | 1681 | Window | 1729 | Window |
225 | 1682 | PixmapDecoratorAcceptance::CreateDecoratableWindow (::Display *display) | 1730 | PixmapDecoratorAcceptance::CreateDecoratableWindow (::Display *display) |
226 | 1683 | { | 1731 | { |
227 | @@ -1734,8 +1782,47 @@ | |||
228 | 1734 | Window window, | 1782 | Window window, |
229 | 1735 | const FakeDecorPtr &decoration) | 1783 | const FakeDecorPtr &decoration) |
230 | 1736 | { | 1784 | { |
231 | 1785 | WaitForDecorationUpdate (display, window, decoration); | ||
232 | 1737 | WaitForPropertyNotify (display, window, DECOR_INPUT_FRAME_ATOM_NAME); | 1786 | WaitForPropertyNotify (display, window, DECOR_INPUT_FRAME_ATOM_NAME); |
234 | 1738 | WaitForDecorationUpdate (display, window, decoration); | 1787 | } |
235 | 1788 | |||
236 | 1789 | void | ||
237 | 1790 | PixmapDecoratorAcceptance::WaitForDefaultDecoration (::Display *display, | ||
238 | 1791 | Window window, | ||
239 | 1792 | CompRect &decoratedWindowGeometry, | ||
240 | 1793 | CompRect &decoratedFrameGeometry) | ||
241 | 1794 | { | ||
242 | 1795 | WaitForDecoration (display, window, rootActiveDecoration); | ||
243 | 1796 | |||
244 | 1797 | /* Fetch the window's absolute geometry */ | ||
245 | 1798 | int x, y; | ||
246 | 1799 | unsigned int width, height, border; | ||
247 | 1800 | |||
248 | 1801 | ct::AbsoluteWindowGeometry (display, window, x, y, width, height, border); | ||
249 | 1802 | |||
250 | 1803 | /* Fetch frame extents */ | ||
251 | 1804 | boost::shared_ptr <unsigned char> data; | ||
252 | 1805 | |||
253 | 1806 | FetchAndVerifyProperty (Display (), | ||
254 | 1807 | window, | ||
255 | 1808 | NETWMFrameExtentsAtom, | ||
256 | 1809 | XA_CARDINAL, | ||
257 | 1810 | 32, | ||
258 | 1811 | 4, | ||
259 | 1812 | 0, | ||
260 | 1813 | data); | ||
261 | 1814 | |||
262 | 1815 | unsigned long *frameExtents = | ||
263 | 1816 | reinterpret_cast <unsigned long *> (data.get ()); | ||
264 | 1817 | |||
265 | 1818 | decoratedWindowGeometry.setGeometry (x, y, width, height); | ||
266 | 1819 | |||
267 | 1820 | /* Adjust for decoration size. This is what future decorations | ||
268 | 1821 | * will add and subtract from */ | ||
269 | 1822 | decoratedFrameGeometry.setGeometry (x - frameExtents[0], | ||
270 | 1823 | y - frameExtents[2], | ||
271 | 1824 | width + (frameExtents[0] + frameExtents[1]), | ||
272 | 1825 | height + (frameExtents[2] + frameExtents[3])); | ||
273 | 1739 | } | 1826 | } |
274 | 1740 | 1827 | ||
275 | 1741 | void | 1828 | void |
276 | @@ -1811,6 +1898,123 @@ | |||
277 | 1811 | return windowDecorations[window]; | 1898 | return windowDecorations[window]; |
278 | 1812 | } | 1899 | } |
279 | 1813 | 1900 | ||
280 | 1901 | class PixmapInitialDecorationAcceptance : | ||
281 | 1902 | public PixmapDecoratorAcceptance | ||
282 | 1903 | { | ||
283 | 1904 | public: | ||
284 | 1905 | |||
285 | 1906 | virtual void SetUp (); | ||
286 | 1907 | virtual void TearDown (); | ||
287 | 1908 | |||
288 | 1909 | virtual bool StartDecoratorOnSetUp () const; | ||
289 | 1910 | |||
290 | 1911 | Window CreateDecoratedWindow (); | ||
291 | 1912 | |||
292 | 1913 | protected: | ||
293 | 1914 | |||
294 | 1915 | cdt::FakePixmapTypeDecoration::Ptr mTestWindowDecoration; | ||
295 | 1916 | CompRect mClientGeometryOnInitialDecoration; | ||
296 | 1917 | CompRect mBorderGeometryOnInitialDecoration; | ||
297 | 1918 | }; | ||
298 | 1919 | |||
299 | 1920 | void | ||
300 | 1921 | PixmapInitialDecorationAcceptance::SetUp () | ||
301 | 1922 | { | ||
302 | 1923 | PixmapDecoratorAcceptance::SetUp (); | ||
303 | 1924 | |||
304 | 1925 | unsigned int ResBo = ActiveBorderExtent + 1; | ||
305 | 1926 | unsigned int ResIn = ActiveInputExtent; | ||
306 | 1927 | unsigned int MaxEx = MaximizedBorderExtent; | ||
307 | 1928 | |||
308 | 1929 | mTestWindowDecoration = | ||
309 | 1930 | MakeFakePixmapTypeDecoration (DECOR_WINDOW_TYPE_NORMAL, | ||
310 | 1931 | 0, | ||
311 | 1932 | 0, | ||
312 | 1933 | 10, | ||
313 | 1934 | 10, | ||
314 | 1935 | DecorationExtents (ResBo, ResBo, ResBo, ResBo), | ||
315 | 1936 | DecorationExtents (ResIn, ResIn, ResIn, ResIn), | ||
316 | 1937 | DecorationExtents (MaxEx, MaxEx, MaxEx, MaxEx), | ||
317 | 1938 | DecorationExtents (MaxEx, MaxEx, MaxEx, MaxEx), | ||
318 | 1939 | Display ()); | ||
319 | 1940 | } | ||
320 | 1941 | |||
321 | 1942 | bool | ||
322 | 1943 | PixmapInitialDecorationAcceptance::StartDecoratorOnSetUp () const | ||
323 | 1944 | { | ||
324 | 1945 | return false; | ||
325 | 1946 | } | ||
326 | 1947 | |||
327 | 1948 | void | ||
328 | 1949 | PixmapInitialDecorationAcceptance::TearDown () | ||
329 | 1950 | { | ||
330 | 1951 | mTestWindowDecoration.reset (); | ||
331 | 1952 | PixmapDecoratorAcceptance::TearDown (); | ||
332 | 1953 | } | ||
333 | 1954 | |||
334 | 1955 | Window | ||
335 | 1956 | PixmapInitialDecorationAcceptance::CreateDecoratedWindow () | ||
336 | 1957 | { | ||
337 | 1958 | Window testWindow = CreateDecoratableWindow (Display ()); | ||
338 | 1959 | |||
339 | 1960 | /* We need to first explicitly recieve PropertyNotify events before | ||
340 | 1961 | * core starts sending them */ | ||
341 | 1962 | RecievePropertyNotifyEvents (Display (), testWindow); | ||
342 | 1963 | |||
343 | 1964 | /* Map and reparent the window so that it gets a decoration */ | ||
344 | 1965 | MapAndReparent (Display (), testWindow); | ||
345 | 1966 | |||
346 | 1967 | /* Start the decorator */ | ||
347 | 1968 | SetUpDecorator (); | ||
348 | 1969 | |||
349 | 1970 | WaitForDefaultDecoration (Display (), | ||
350 | 1971 | testWindow, | ||
351 | 1972 | mClientGeometryOnInitialDecoration, | ||
352 | 1973 | mBorderGeometryOnInitialDecoration); | ||
353 | 1974 | DecorateWindow (Display (), testWindow, mTestWindowDecoration); | ||
354 | 1975 | WaitForDecorationUpdate (Display (), testWindow, mTestWindowDecoration); | ||
355 | 1976 | |||
356 | 1977 | return testWindow; | ||
357 | 1978 | } | ||
358 | 1979 | |||
359 | 1980 | std::ostream & | ||
360 | 1981 | operator<< (std::ostream &os, const CompSize &sz) | ||
361 | 1982 | { | ||
362 | 1983 | return os << "Size: (width: " | ||
363 | 1984 | << sz.width () | ||
364 | 1985 | << " height: " | ||
365 | 1986 | << sz.height () | ||
366 | 1987 | << ")"; | ||
367 | 1988 | } | ||
368 | 1989 | |||
369 | 1990 | TEST_F (PixmapInitialDecorationAcceptance, NoSizeChangeInitially) | ||
370 | 1991 | { | ||
371 | 1992 | CreateDecoratedWindow (); | ||
372 | 1993 | EXPECT_EQ (CompSize (mClientGeometryOnInitialDecoration.width (), | ||
373 | 1994 | mClientGeometryOnInitialDecoration.height ()), | ||
374 | 1995 | CompSize (ct::WINDOW_WIDTH, | ||
375 | 1996 | ct::WINDOW_HEIGHT)); | ||
376 | 1997 | } | ||
377 | 1998 | |||
378 | 1999 | TEST_F (PixmapInitialDecorationAcceptance, SizeChangesApplySubsequently) | ||
379 | 2000 | { | ||
380 | 2001 | Window testWindow = CreateDecoratedWindow (); | ||
381 | 2002 | |||
382 | 2003 | /* Measuring size change from default decoration to real decoration */ | ||
383 | 2004 | const CompSize &size (mTestWindowDecoration->restoredDecorationBorderSize ()); | ||
384 | 2005 | |||
385 | 2006 | EXPECT_THAT (testWindow, | ||
386 | 2007 | HasGeometry (Display (), | ||
387 | 2008 | RelativeWindowGeometry, | ||
388 | 2009 | _, | ||
389 | 2010 | _, | ||
390 | 2011 | mBorderGeometryOnInitialDecoration.width () - | ||
391 | 2012 | size.width (), | ||
392 | 2013 | mBorderGeometryOnInitialDecoration.height () - | ||
393 | 2014 | size.height (), | ||
394 | 2015 | _)); | ||
395 | 2016 | } | ||
396 | 2017 | |||
397 | 1814 | class PixmapDecoratedWindowAcceptance : | 2018 | class PixmapDecoratedWindowAcceptance : |
398 | 1815 | public PixmapDecoratorAcceptance | 2019 | public PixmapDecoratorAcceptance |
399 | 1816 | { | 2020 | { |
400 | @@ -1831,6 +2035,8 @@ | |||
401 | 1831 | Window mTestWindowParent; | 2035 | Window mTestWindowParent; |
402 | 1832 | 2036 | ||
403 | 1833 | cdt::FakePixmapTypeDecoration::Ptr mTestWindowDecoration; | 2037 | cdt::FakePixmapTypeDecoration::Ptr mTestWindowDecoration; |
404 | 2038 | CompRect mClientGeometryOnInitialDecoration; | ||
405 | 2039 | CompRect mBorderGeometryOnInitialDecoration; | ||
406 | 1834 | }; | 2040 | }; |
407 | 1835 | 2041 | ||
408 | 1836 | PixmapDecoratedWindowAcceptance::PixmapDecoratedWindowAcceptance () : | 2042 | PixmapDecoratedWindowAcceptance::PixmapDecoratedWindowAcceptance () : |
409 | @@ -1851,6 +2057,11 @@ | |||
410 | 1851 | /* Start the decorator */ | 2057 | /* Start the decorator */ |
411 | 1852 | SetUpDecorator (); | 2058 | SetUpDecorator (); |
412 | 1853 | 2059 | ||
413 | 2060 | WaitForDefaultDecoration (display, | ||
414 | 2061 | mTestWindow, | ||
415 | 2062 | mClientGeometryOnInitialDecoration, | ||
416 | 2063 | mBorderGeometryOnInitialDecoration); | ||
417 | 2064 | |||
418 | 1854 | /* We need to change the border extent so that the window | 2065 | /* We need to change the border extent so that the window |
419 | 1855 | * will move from its position in the default decoration */ | 2066 | * will move from its position in the default decoration */ |
420 | 1856 | unsigned int ResBo = RealDecorationActiveBorderExtent; | 2067 | unsigned int ResBo = RealDecorationActiveBorderExtent; |
421 | @@ -1870,15 +2081,16 @@ | |||
422 | 1870 | Display ()); | 2081 | Display ()); |
423 | 1871 | 2082 | ||
424 | 1872 | DecorateWindow (display, mTestWindow, mTestWindowDecoration); | 2083 | DecorateWindow (display, mTestWindow, mTestWindowDecoration); |
426 | 1873 | WaitForDecoration (display, mTestWindow, mTestWindowDecoration); | 2084 | WaitForDecorationUpdate (display, mTestWindow, mTestWindowDecoration); |
427 | 1874 | } | 2085 | } |
428 | 1875 | 2086 | ||
429 | 1876 | void | 2087 | void |
430 | 1877 | PixmapDecoratedWindowAcceptance::TearDown () | 2088 | PixmapDecoratedWindowAcceptance::TearDown () |
431 | 1878 | { | 2089 | { |
432 | 2090 | mTestWindowDecoration.reset (); | ||
433 | 1879 | DestroyWindow (Display (), mTestWindow); | 2091 | DestroyWindow (Display (), mTestWindow); |
434 | 1880 | 2092 | ||
436 | 1881 | DecorWithPixmapDefaultsAcceptance::TearDown (); | 2093 | PixmapDecoratorAcceptance::TearDown (); |
437 | 1882 | } | 2094 | } |
438 | 1883 | 2095 | ||
439 | 1884 | bool | 2096 | bool |
440 | @@ -2196,25 +2408,25 @@ | |||
441 | 2196 | 2408 | ||
442 | 2197 | /* Ensure that a window expands to its original size when it is | 2409 | /* Ensure that a window expands to its original size when it is |
443 | 2198 | * undecorated */ | 2410 | * undecorated */ |
445 | 2199 | TEST_F (PixmapDecoratedWindowAcceptance, UndecoratedWindowExpandToOrigSize) | 2411 | TEST_F (PixmapDecoratedWindowAcceptance, UndecoratedWindowExpandToOrigSizePlusInitialBorder) |
446 | 2200 | { | 2412 | { |
447 | 2201 | DisallowDecorationsOnWindow (mTestWindow); | 2413 | DisallowDecorationsOnWindow (mTestWindow); |
448 | 2202 | 2414 | ||
449 | 2203 | WaitForConfigureOn (Display (), | 2415 | WaitForConfigureOn (Display (), |
450 | 2204 | mTestWindowParent, | 2416 | mTestWindowParent, |
455 | 2205 | ct::WINDOW_X, | 2417 | mBorderGeometryOnInitialDecoration.x (), |
456 | 2206 | ct::WINDOW_Y, | 2418 | mBorderGeometryOnInitialDecoration.y (), |
457 | 2207 | ct::WINDOW_WIDTH, | 2419 | mBorderGeometryOnInitialDecoration.width (), |
458 | 2208 | ct::WINDOW_HEIGHT, | 2420 | mBorderGeometryOnInitialDecoration.height (), |
459 | 2209 | CWX | CWY | CWWidth | CWHeight); | 2421 | CWX | CWY | CWWidth | CWHeight); |
460 | 2210 | 2422 | ||
461 | 2211 | EXPECT_THAT (mTestWindow, | 2423 | EXPECT_THAT (mTestWindow, |
462 | 2212 | HasGeometry (Display (), | 2424 | HasGeometry (Display (), |
463 | 2213 | AbsoluteWindowGeometry, | 2425 | AbsoluteWindowGeometry, |
468 | 2214 | ct::WINDOW_X, | 2426 | mBorderGeometryOnInitialDecoration.x (), |
469 | 2215 | ct::WINDOW_Y, | 2427 | mBorderGeometryOnInitialDecoration.y (), |
470 | 2216 | ct::WINDOW_WIDTH, | 2428 | mBorderGeometryOnInitialDecoration.width (), |
471 | 2217 | ct::WINDOW_HEIGHT, | 2429 | mBorderGeometryOnInitialDecoration.height (), |
472 | 2218 | _)); | 2430 | _)); |
473 | 2219 | } | 2431 | } |
474 | 2220 | 2432 | ||
475 | @@ -2230,19 +2442,19 @@ | |||
476 | 2230 | 2442 | ||
477 | 2231 | WaitForConfigureOn (Display (), | 2443 | WaitForConfigureOn (Display (), |
478 | 2232 | mTestWindowParent, | 2444 | mTestWindowParent, |
483 | 2233 | ct::WINDOW_X, | 2445 | mBorderGeometryOnInitialDecoration.x (), |
484 | 2234 | ct::WINDOW_Y, | 2446 | mBorderGeometryOnInitialDecoration.y (), |
485 | 2235 | ct::WINDOW_WIDTH, | 2447 | mBorderGeometryOnInitialDecoration.width (), |
486 | 2236 | ct::WINDOW_HEIGHT, | 2448 | mBorderGeometryOnInitialDecoration.height (), |
487 | 2237 | CWX | CWY | CWWidth | CWHeight); | 2449 | CWX | CWY | CWWidth | CWHeight); |
488 | 2238 | 2450 | ||
489 | 2239 | EXPECT_THAT (mTestWindow, | 2451 | EXPECT_THAT (mTestWindow, |
490 | 2240 | HasGeometry (Display (), | 2452 | HasGeometry (Display (), |
491 | 2241 | AbsoluteWindowGeometry, | 2453 | AbsoluteWindowGeometry, |
496 | 2242 | ct::WINDOW_X, | 2454 | mBorderGeometryOnInitialDecoration.x (), |
497 | 2243 | ct::WINDOW_Y, | 2455 | mBorderGeometryOnInitialDecoration.y (), |
498 | 2244 | ct::WINDOW_WIDTH, | 2456 | mBorderGeometryOnInitialDecoration.width (), |
499 | 2245 | ct::WINDOW_HEIGHT, | 2457 | mBorderGeometryOnInitialDecoration.height (), |
500 | 2246 | _)); | 2458 | _)); |
501 | 2247 | } | 2459 | } |
502 | 2248 | 2460 | ||
503 | @@ -2324,8 +2536,10 @@ | |||
504 | 2324 | 2536 | ||
505 | 2325 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), | 2537 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), |
506 | 2326 | AbsoluteWindowGeometry, | 2538 | AbsoluteWindowGeometry, |
509 | 2327 | ct::WINDOW_X + GetParam ().left, | 2539 | mBorderGeometryOnInitialDecoration.x () + |
510 | 2328 | ct::WINDOW_Y + GetParam ().top, | 2540 | GetParam ().left, |
511 | 2541 | mBorderGeometryOnInitialDecoration.y () + | ||
512 | 2542 | GetParam ().top, | ||
513 | 2329 | _, | 2543 | _, |
514 | 2330 | _, | 2544 | _, |
515 | 2331 | _)); | 2545 | _)); |
516 | @@ -2344,10 +2558,12 @@ | |||
517 | 2344 | AbsoluteWindowGeometry, | 2558 | AbsoluteWindowGeometry, |
518 | 2345 | _, | 2559 | _, |
519 | 2346 | _, | 2560 | _, |
524 | 2347 | ct::WINDOW_WIDTH - (GetParam ().left + | 2561 | mBorderGeometryOnInitialDecoration.width () - |
525 | 2348 | GetParam ().right), | 2562 | (GetParam ().left + |
526 | 2349 | ct::WINDOW_HEIGHT - (GetParam ().top + | 2563 | GetParam ().right), |
527 | 2350 | GetParam ().bottom), | 2564 | mBorderGeometryOnInitialDecoration.height () - |
528 | 2565 | (GetParam ().top + | ||
529 | 2566 | GetParam ().bottom), | ||
530 | 2351 | _)); | 2567 | _)); |
531 | 2352 | } | 2568 | } |
532 | 2353 | 2569 | ||
533 | @@ -2373,10 +2589,12 @@ | |||
534 | 2373 | AbsoluteWindowGeometry, | 2589 | AbsoluteWindowGeometry, |
535 | 2374 | _, | 2590 | _, |
536 | 2375 | _, | 2591 | _, |
541 | 2376 | ct::WINDOW_WIDTH - (newExtents.left + | 2592 | mBorderGeometryOnInitialDecoration.width () - |
542 | 2377 | newExtents.right), | 2593 | (newExtents.left + |
543 | 2378 | ct::WINDOW_HEIGHT - (newExtents.top + | 2594 | newExtents.right), |
544 | 2379 | newExtents.bottom), | 2595 | mBorderGeometryOnInitialDecoration.height () - |
545 | 2596 | (newExtents.top + | ||
546 | 2597 | newExtents.bottom), | ||
547 | 2380 | _)); | 2598 | _)); |
548 | 2381 | } | 2599 | } |
549 | 2382 | 2600 | ||
550 | @@ -2401,7 +2619,7 @@ | |||
551 | 2401 | WindowDecorationAtom); | 2619 | WindowDecorationAtom); |
552 | 2402 | 2620 | ||
553 | 2403 | const CompPoint &off (mTestWindowDecoration->restoredFrameWindowOffset ()); | 2621 | const CompPoint &off (mTestWindowDecoration->restoredFrameWindowOffset ()); |
555 | 2404 | const CompSize &size (mTestWindowDecoration->restoredDecorationSize ()); | 2622 | const CompSize &size (mTestWindowDecoration->restoredDecorationInputSize ()); |
556 | 2405 | 2623 | ||
557 | 2406 | /* As the window is shrunk to accomodate the border size, we must subtract | 2624 | /* As the window is shrunk to accomodate the border size, we must subtract |
558 | 2407 | * the border from the original window size */ | 2625 | * the border from the original window size */ |
559 | @@ -2409,19 +2627,26 @@ | |||
560 | 2409 | (newExtents.top + newExtents.bottom)); | 2627 | (newExtents.top + newExtents.bottom)); |
561 | 2410 | 2628 | ||
562 | 2411 | RestoreWindow (mTestWindow, | 2629 | RestoreWindow (mTestWindow, |
567 | 2412 | ct::WINDOW_X + off.x (), | 2630 | mBorderGeometryOnInitialDecoration.x () + off.x (), |
568 | 2413 | ct::WINDOW_Y + off.y (), | 2631 | mBorderGeometryOnInitialDecoration.y () + off.y (), |
569 | 2414 | ct::WINDOW_WIDTH - shrink.width () + size.width (), | 2632 | mBorderGeometryOnInitialDecoration.width () - |
570 | 2415 | ct::WINDOW_HEIGHT - shrink.height () + size.height ()); | 2633 | shrink.width () + size.width (), |
571 | 2634 | mBorderGeometryOnInitialDecoration.height () - | ||
572 | 2635 | shrink.height () + size.height ()); | ||
573 | 2416 | 2636 | ||
574 | 2637 | /* Subtract the old offset and size and add on the new decoration geometry */ | ||
575 | 2417 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), | 2638 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), |
576 | 2418 | AbsoluteWindowGeometry, | 2639 | AbsoluteWindowGeometry, |
583 | 2419 | ct::WINDOW_X + newExtents.left, | 2640 | mBorderGeometryOnInitialDecoration.x () + |
584 | 2420 | ct::WINDOW_Y + newExtents.top, | 2641 | newExtents.left, |
585 | 2421 | ct::WINDOW_WIDTH - (newExtents.left + | 2642 | mBorderGeometryOnInitialDecoration.y () + |
586 | 2422 | newExtents.right), | 2643 | newExtents.top, |
587 | 2423 | ct::WINDOW_HEIGHT - (newExtents.top + | 2644 | mBorderGeometryOnInitialDecoration.width () - |
588 | 2424 | newExtents.bottom), | 2645 | ((newExtents.left + |
589 | 2646 | newExtents.right)), | ||
590 | 2647 | mBorderGeometryOnInitialDecoration.height () - | ||
591 | 2648 | ((newExtents.top + | ||
592 | 2649 | newExtents.bottom)), | ||
593 | 2425 | _)); | 2650 | _)); |
594 | 2426 | } | 2651 | } |
595 | 2427 | 2652 | ||
596 | @@ -2451,7 +2676,7 @@ | |||
597 | 2451 | AllowDecorationsOnWindow (mTestWindow); | 2676 | AllowDecorationsOnWindow (mTestWindow); |
598 | 2452 | 2677 | ||
599 | 2453 | const CompPoint &off (mTestWindowDecoration->restoredFrameWindowOffset ()); | 2678 | const CompPoint &off (mTestWindowDecoration->restoredFrameWindowOffset ()); |
601 | 2454 | const CompSize &size (mTestWindowDecoration->restoredDecorationSize ()); | 2679 | const CompSize &size (mTestWindowDecoration->restoredDecorationInputSize ()); |
602 | 2455 | 2680 | ||
603 | 2456 | /* As the window is shrunk to accomadate the border size, we must subtract | 2681 | /* As the window is shrunk to accomadate the border size, we must subtract |
604 | 2457 | * the border from the original window size */ | 2682 | * the border from the original window size */ |
605 | @@ -2460,20 +2685,26 @@ | |||
606 | 2460 | 2685 | ||
607 | 2461 | WaitForConfigureOn (Display (), | 2686 | WaitForConfigureOn (Display (), |
608 | 2462 | mTestWindowParent, | 2687 | mTestWindowParent, |
613 | 2463 | ct::WINDOW_X + off.x (), | 2688 | mBorderGeometryOnInitialDecoration.x () + off.x (), |
614 | 2464 | ct::WINDOW_Y + off.y (), | 2689 | mBorderGeometryOnInitialDecoration.y () + off.y (), |
615 | 2465 | ct::WINDOW_WIDTH - shrink.width () + size.width (), | 2690 | mBorderGeometryOnInitialDecoration.width () - |
616 | 2466 | ct::WINDOW_HEIGHT - shrink.height () + size.height (), | 2691 | shrink.width () + size.width (), |
617 | 2692 | mBorderGeometryOnInitialDecoration.height () - | ||
618 | 2693 | shrink.height () + size.height (), | ||
619 | 2467 | CWX | CWY | CWWidth | CWHeight); | 2694 | CWX | CWY | CWWidth | CWHeight); |
620 | 2468 | 2695 | ||
621 | 2469 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), | 2696 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), |
622 | 2470 | AbsoluteWindowGeometry, | 2697 | AbsoluteWindowGeometry, |
629 | 2471 | ct::WINDOW_X + newExtents.left, | 2698 | mBorderGeometryOnInitialDecoration.x () + |
630 | 2472 | ct::WINDOW_Y + newExtents.top, | 2699 | newExtents.left, |
631 | 2473 | ct::WINDOW_WIDTH - (newExtents.left + | 2700 | mBorderGeometryOnInitialDecoration.y () + |
632 | 2474 | newExtents.right), | 2701 | newExtents.top, |
633 | 2475 | ct::WINDOW_HEIGHT - (newExtents.top + | 2702 | mBorderGeometryOnInitialDecoration.width () - |
634 | 2476 | newExtents.bottom), | 2703 | (newExtents.left + |
635 | 2704 | newExtents.right), | ||
636 | 2705 | mBorderGeometryOnInitialDecoration.height () - | ||
637 | 2706 | (newExtents.top + | ||
638 | 2707 | newExtents.bottom), | ||
639 | 2477 | _)); | 2708 | _)); |
640 | 2478 | } | 2709 | } |
641 | 2479 | 2710 | ||
642 | @@ -2490,8 +2721,8 @@ | |||
643 | 2490 | 2721 | ||
644 | 2491 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), | 2722 | EXPECT_THAT (mTestWindow, HasGeometry (Display (), |
645 | 2492 | AbsoluteWindowGeometry, | 2723 | AbsoluteWindowGeometry, |
648 | 2493 | ct::WINDOW_X + 1, | 2724 | mBorderGeometryOnInitialDecoration.x () + 1, |
649 | 2494 | ct::WINDOW_Y + 1, | 2725 | mBorderGeometryOnInitialDecoration.y () + 1, |
650 | 2495 | _, | 2726 | _, |
651 | 2496 | _, | 2727 | _, |
652 | 2497 | _)); | 2728 | _)); |
653 | 2498 | 2729 | ||
654 | === modified file 'src/privatewindow.h' | |||
655 | --- src/privatewindow.h 2013-06-26 10:49:55 +0000 | |||
656 | +++ src/privatewindow.h 2013-07-19 04:17:27 +0000 | |||
657 | @@ -401,6 +401,7 @@ | |||
658 | 401 | bool shaded; | 401 | bool shaded; |
659 | 402 | bool hidden; | 402 | bool hidden; |
660 | 403 | bool grabbed; | 403 | bool grabbed; |
661 | 404 | bool alreadyDecorated; | ||
662 | 404 | 405 | ||
663 | 405 | unsigned int desktop; | 406 | unsigned int desktop; |
664 | 406 | 407 | ||
665 | 407 | 408 | ||
666 | === modified file 'src/window.cpp' | |||
667 | --- src/window.cpp 2013-07-18 13:06:24 +0000 | |||
668 | +++ src/window.cpp 2013-07-19 04:17:27 +0000 | |||
669 | @@ -6273,9 +6273,25 @@ | |||
670 | 6273 | 6273 | ||
671 | 6274 | namespace | 6274 | namespace |
672 | 6275 | { | 6275 | { |
673 | 6276 | class NullConfigureBufferLock : | ||
674 | 6277 | public crb::BufferLock | ||
675 | 6278 | { | ||
676 | 6279 | public: | ||
677 | 6280 | |||
678 | 6281 | NullConfigureBufferLock (crb::CountedFreeze *cf) {} | ||
679 | 6282 | |||
680 | 6283 | void lock () {} | ||
681 | 6284 | void release () {} | ||
682 | 6285 | }; | ||
683 | 6286 | |||
684 | 6276 | crb::BufferLock::Ptr | 6287 | crb::BufferLock::Ptr |
685 | 6277 | createConfigureBufferLock (crb::CountedFreeze *cf) | 6288 | createConfigureBufferLock (crb::CountedFreeze *cf) |
686 | 6278 | { | 6289 | { |
687 | 6290 | /* Return an implementation that does nothing if the user explicitly | ||
688 | 6291 | * disabled buffer locks for this running instance */ | ||
689 | 6292 | if (getenv ("COMPIZ_NO_CONFIGURE_BUFFER_LOCKS")) | ||
690 | 6293 | return boost::make_shared <NullConfigureBufferLock> (cf); | ||
691 | 6294 | |||
692 | 6279 | return boost::make_shared <crb::ConfigureBufferLock> (cf); | 6295 | return boost::make_shared <crb::ConfigureBufferLock> (cf); |
693 | 6280 | } | 6296 | } |
694 | 6281 | } | 6297 | } |
695 | @@ -6322,6 +6338,7 @@ | |||
696 | 6322 | shaded (false), | 6338 | shaded (false), |
697 | 6323 | hidden (false), | 6339 | hidden (false), |
698 | 6324 | grabbed (false), | 6340 | grabbed (false), |
699 | 6341 | alreadyDecorated (false), | ||
700 | 6325 | 6342 | ||
701 | 6326 | desktop (0), | 6343 | desktop (0), |
702 | 6327 | 6344 | ||
703 | @@ -6568,11 +6585,17 @@ | |||
704 | 6568 | 6585 | ||
705 | 6569 | CompSize sizeDelta; | 6586 | CompSize sizeDelta; |
706 | 6570 | 6587 | ||
712 | 6571 | if (isMapped()) | 6588 | /* We don't want to change the size of the window the first time we |
713 | 6572 | sizeDelta = CompSize (-((b->left + b->right) - | 6589 | * decorate it, but we do thereafter */ |
714 | 6573 | (priv->border.left + priv->border.right)), | 6590 | if (priv->alreadyDecorated) |
715 | 6574 | -((b->top + b->bottom) - | 6591 | { |
716 | 6575 | (priv->border.top + priv->border.bottom))); | 6592 | sizeDelta.setWidth (-((b->left + b->right) - |
717 | 6593 | (priv->border.left + priv->border.right))); | ||
718 | 6594 | sizeDelta.setHeight (-((b->top + b->bottom) - | ||
719 | 6595 | (priv->border.top + priv->border.bottom))); | ||
720 | 6596 | } | ||
721 | 6597 | else | ||
722 | 6598 | priv->alreadyDecorated = true; | ||
723 | 6576 | 6599 | ||
724 | 6577 | priv->serverInput = *i; | 6600 | priv->serverInput = *i; |
725 | 6578 | priv->border = *b; | 6601 | priv->border = *b; |
FAILED: Continuous integration, rev:3755 jenkins. qa.ubuntu. com/job/ compiz- ci/260/ jenkins. qa.ubuntu. com/job/ compiz- gles-ci/ ./build= pbuilder, distribution= raring, flavor= amd64/301/ console jenkins. qa.ubuntu. com/job/ compiz- saucy-amd64- ci/73/console jenkins. qa.ubuntu. com/job/ compiz- saucy-armhf- ci/73/console jenkins. qa.ubuntu. com/job/ compiz- saucy-i386- ci/73/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ compiz- ci/260/ rebuild
http://