projects/aports·blob master · refs

431 lines · 12.7 KiB

1diff --git a/CMakeLists.txt b/CMakeLists.txt
2index fbb7e3e..4eafefd 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -126,10 +126,12 @@ set (COMPIZ_REQUIRES
6 libxslt
7 glib-2.0
8 gio-2.0
9- glibmm-2.4
10+ glibmm-2.68
11 "libstartup-notification-1.0 >= 0.7"
12 )
13
14+set (CMAKE_CXX_STANDARD 17)
15+
16 set (DECORATION_REQUIRES "xrender >= 0.9.3")
17
18 compiz_pkg_check_modules (COMPIZ REQUIRED ${COMPIZ_REQUIRES})
19diff --git a/plugins/decor/src/clip-groups/CMakeLists.txt b/plugins/decor/src/clip-groups/CMakeLists.txt
20index 0c267d9..4a97cd2 100644
21--- a/plugins/decor/src/clip-groups/CMakeLists.txt
22+++ b/plugins/decor/src/clip-groups/CMakeLists.txt
23@@ -1,9 +1,11 @@
24 pkg_check_modules (
25 GLIBMM
26 REQUIRED
27- glibmm-2.4 glib-2.0
28+ glibmm-2.68 glib-2.0
29 )
30
31+set (CMAKE_CXX_STANDARD 17)
32+
33 INCLUDE_DIRECTORIES (
34 ${CMAKE_CURRENT_SOURCE_DIR}/include
35 ${CMAKE_CURRENT_SOURCE_DIR}/src
36diff --git a/plugins/decor/src/pixmap-requests/CMakeLists.txt b/plugins/decor/src/pixmap-requests/CMakeLists.txt
37index 0d0db14..59600c9 100644
38--- a/plugins/decor/src/pixmap-requests/CMakeLists.txt
39+++ b/plugins/decor/src/pixmap-requests/CMakeLists.txt
40@@ -1,9 +1,11 @@
41 pkg_check_modules (
42 GLIBMM
43 REQUIRED
44- glibmm-2.4 glib-2.0
45+ glibmm-2.68 glib-2.0
46 )
47
48+set (CMAKE_CXX_STANDARD 17)
49+
50 INCLUDE_DIRECTORIES (
51 ${CMAKE_CURRENT_SOURCE_DIR}/include
52 ${CMAKE_CURRENT_SOURCE_DIR}/src
53diff --git a/plugins/place/src/constrain-to-workarea/CMakeLists.txt b/plugins/place/src/constrain-to-workarea/CMakeLists.txt
54index 80c9c4b..70e16cf 100644
55--- a/plugins/place/src/constrain-to-workarea/CMakeLists.txt
56+++ b/plugins/place/src/constrain-to-workarea/CMakeLists.txt
57@@ -1,9 +1,11 @@
58 pkg_check_modules (
59 GLIBMM
60 REQUIRED
61- glibmm-2.4 glib-2.0
62+ glibmm-2.68 glib-2.0
63 )
64
65+set (CMAKE_CXX_STANDARD 17)
66+
67 INCLUDE_DIRECTORIES (
68 ${CMAKE_CURRENT_SOURCE_DIR}/include
69 ${CMAKE_CURRENT_SOURCE_DIR}/src
70diff --git a/plugins/place/src/screen-size-change/CMakeLists.txt b/plugins/place/src/screen-size-change/CMakeLists.txt
71index 6f52e49..44c53ce 100644
72--- a/plugins/place/src/screen-size-change/CMakeLists.txt
73+++ b/plugins/place/src/screen-size-change/CMakeLists.txt
74@@ -1,9 +1,11 @@
75 pkg_check_modules (
76 GLIBMM
77 REQUIRED
78- glibmm-2.4 glib-2.0
79+ glibmm-2.68 glib-2.0
80 )
81
82+set (CMAKE_CXX_STANDARD 17)
83+
84 INCLUDE_DIRECTORIES (
85 ${CMAKE_CURRENT_SOURCE_DIR}/include
86 ${CMAKE_CURRENT_SOURCE_DIR}/src
87diff --git a/plugins/place/src/smart/CMakeLists.txt b/plugins/place/src/smart/CMakeLists.txt
88index 24e66fd..8cfbcc7 100644
89--- a/plugins/place/src/smart/CMakeLists.txt
90+++ b/plugins/place/src/smart/CMakeLists.txt
91@@ -1,9 +1,11 @@
92 pkg_check_modules (
93 GLIBMM
94 REQUIRED
95- glibmm-2.4 glib-2.0
96+ glibmm-2.68 glib-2.0
97 )
98
99+set (CMAKE_CXX_STANDARD 17)
100+
101 INCLUDE_DIRECTORIES (
102 ${CMAKE_CURRENT_SOURCE_DIR}/include
103 ${CMAKE_CURRENT_SOURCE_DIR}/src
104diff --git a/src/point/CMakeLists.txt b/src/point/CMakeLists.txt
105index 207b2e5..072e230 100644
106--- a/src/point/CMakeLists.txt
107+++ b/src/point/CMakeLists.txt
108@@ -1,9 +1,11 @@
109 pkg_check_modules (
110 GLIBMM
111 REQUIRED
112- glibmm-2.4 glib-2.0
113+ glibmm-2.68 glib-2.0
114 )
115
116+set (CMAKE_CXX_STANDARD 17)
117+
118 INCLUDE_DIRECTORIES (
119 ${compiz_SOURCE_DIR}/include
120 ${Boost_INCLUDE_DIRS}
121diff --git a/src/rect/CMakeLists.txt b/src/rect/CMakeLists.txt
122index 336235b..76246a4 100644
123--- a/src/rect/CMakeLists.txt
124+++ b/src/rect/CMakeLists.txt
125@@ -1,9 +1,11 @@
126 pkg_check_modules (
127 GLIBMM
128 REQUIRED
129- glibmm-2.4 glib-2.0
130+ glibmm-2.68 glib-2.0
131 )
132
133+set (CMAKE_CXX_STANDARD 17)
134+
135 INCLUDE_DIRECTORIES (
136 ${CMAKE_CURRENT_SOURCE_DIR}/include
137 ${CMAKE_CURRENT_SOURCE_DIR}/src
138diff --git a/src/timer/CMakeLists.txt b/src/timer/CMakeLists.txt
139index 03bb9b6..f3b98dc 100644
140--- a/src/timer/CMakeLists.txt
141+++ b/src/timer/CMakeLists.txt
142@@ -1,9 +1,11 @@
143 pkg_check_modules(
144 GLIBMM
145 REQUIRED
146- glibmm-2.4
147+ glibmm-2.68
148 )
149
150+set (CMAKE_CXX_STANDARD 17)
151+
152 INCLUDE_DIRECTORIES(
153 ${CMAKE_CURRENT_SOURCE_DIR}/include
154 ${CMAKE_CURRENT_SOURCE_DIR}/src
155diff --git a/src/window/constrainment/CMakeLists.txt b/src/window/constrainment/CMakeLists.txt
156index 20a0e95..3dfe69b 100644
157--- a/src/window/constrainment/CMakeLists.txt
158+++ b/src/window/constrainment/CMakeLists.txt
159@@ -1,9 +1,11 @@
160 pkg_check_modules (
161 GLIBMM
162 REQUIRED
163- glibmm-2.4 glib-2.0
164+ glibmm-2.68 glib-2.0
165 )
166
167+set (CMAKE_CXX_STANDARD 17)
168+
169 INCLUDE_DIRECTORIES (
170 ${CMAKE_CURRENT_SOURCE_DIR}/include
171 ${CMAKE_CURRENT_SOURCE_DIR}/src
172diff --git a/src/window/extents/CMakeLists.txt b/src/window/extents/CMakeLists.txt
173index 9e26a7b..5e28664 100644
174--- a/src/window/extents/CMakeLists.txt
175+++ b/src/window/extents/CMakeLists.txt
176@@ -1,9 +1,11 @@
177 pkg_check_modules (
178 GLIBMM
179 REQUIRED
180- glibmm-2.4 glib-2.0
181+ glibmm-2.68 glib-2.0
182 )
183
184+set (CMAKE_CXX_STANDARD 17)
185+
186 INCLUDE_DIRECTORIES (
187 ${CMAKE_CURRENT_SOURCE_DIR}/include
188 ${CMAKE_CURRENT_SOURCE_DIR}/src
189diff --git a/src/window/geometry-saver/CMakeLists.txt b/src/window/geometry-saver/CMakeLists.txt
190index 6d5e12c..3dedb42 100644
191--- a/src/window/geometry-saver/CMakeLists.txt
192+++ b/src/window/geometry-saver/CMakeLists.txt
193@@ -1,9 +1,11 @@
194 pkg_check_modules (
195 GLIBMM
196 REQUIRED
197- glibmm-2.4 glib-2.0
198+ glibmm-2.68 glib-2.0
199 )
200
201+set (CMAKE_CXX_STANDARD 17)
202+
203 INCLUDE_DIRECTORIES (
204 ${CMAKE_CURRENT_SOURCE_DIR}/include
205 ${CMAKE_CURRENT_SOURCE_DIR}/src
206diff --git a/src/window/geometry/CMakeLists.txt b/src/window/geometry/CMakeLists.txt
207index 24bdb21..cda3798 100644
208--- a/src/window/geometry/CMakeLists.txt
209+++ b/src/window/geometry/CMakeLists.txt
210@@ -1,9 +1,11 @@
211 pkg_check_modules (
212 GLIBMM
213 REQUIRED
214- glibmm-2.4 glib-2.0
215+ glibmm-2.68 glib-2.0
216 )
217
218+set (CMAKE_CXX_STANDARD 17)
219+
220 INCLUDE_DIRECTORIES (
221 ${CMAKE_CURRENT_SOURCE_DIR}/include
222 ${CMAKE_CURRENT_SOURCE_DIR}/src
223diff --git a/tests/integration/glib/CMakeLists.txt b/tests/integration/glib/CMakeLists.txt
224index 48d4e12..80a5fda 100644
225--- a/tests/integration/glib/CMakeLists.txt
226+++ b/tests/integration/glib/CMakeLists.txt
227@@ -1,4 +1,6 @@
228-pkg_check_modules (COMPIZ_GLIB_INTEGRATION_TEST glibmm-2.4)
229+pkg_check_modules (COMPIZ_GLIB_INTEGRATION_TEST glibmm-2.68)
230+
231+set (CMAKE_CXX_STANDARD 17)
232
233 if (COMPIZ_GLIB_INTEGRATION_TEST_FOUND)
234
235diff --git a/src/timer/include/core/timer.h b/src/timer/include/core/timer.h
236index c4edb12..fbc1cd6 100644
237--- a/src/timer/include/core/timer.h
238+++ b/src/timer/include/core/timer.h
239@@ -28,6 +28,8 @@
240
241 #include <boost/function.hpp>
242 #include <sys/time.h>
243+
244+#undef PREFIX
245 #include <glibmm/main.h>
246
247 class CompTimeoutSource;
248diff --git a/src/eventsource.cpp b/src/eventsource.cpp
249index 1892cb4..4a7c4b0 100644
250--- a/src/eventsource.cpp
251+++ b/src/eventsource.cpp
252@@ -45,7 +45,7 @@ CompEventSource::CompEventSource (Display *dpy, int fd) :
253 mConnectionFD (fd)
254 {
255 mPollFD.set_fd (mConnectionFD);
256- mPollFD.set_events (Glib::IO_IN);
257+ mPollFD.set_events (Glib::IOCondition::IO_IN);
258
259 set_priority (G_PRIORITY_DEFAULT);
260 add_poll (mPollFD);
261@@ -75,7 +75,7 @@ CompEventSource::prepare (int &timeout)
262 bool
263 CompEventSource::check ()
264 {
265- if (mPollFD.get_revents () & Glib::IO_IN)
266+ if ((mPollFD.get_revents () & Glib::IOCondition::IO_IN) == Glib::IOCondition::IO_IN)
267 return XPending (mDpy);
268
269 return false;
270diff --git a/src/screen.cpp b/src/screen.cpp
271index 89832e0..1476d69 100644
272--- a/src/screen.cpp
273+++ b/src/screen.cpp
274@@ -312,15 +312,15 @@ cps::EventManager::addWatchFd (int fd,
275 memset (&gEvents, 0, sizeof (Glib::IOCondition));
276
277 if (events & POLLIN)
278- gEvents |= Glib::IO_IN;
279+ gEvents |= Glib::IOCondition::IO_IN;
280 if (events & POLLOUT)
281- gEvents |= Glib::IO_OUT;
282+ gEvents |= Glib::IOCondition::IO_OUT;
283 if (events & POLLPRI)
284- gEvents |= Glib::IO_PRI;
285+ gEvents |= Glib::IOCondition::IO_PRI;
286 if (events & POLLERR)
287- gEvents |= Glib::IO_ERR;
288+ gEvents |= Glib::IOCondition::IO_ERR;
289 if (events & POLLHUP)
290- gEvents |= Glib::IO_HUP;
291+ gEvents |= Glib::IOCondition::IO_HUP;
292
293 Glib::RefPtr<CompWatchFd> watchFd = CompWatchFd::create (fd, gEvents, callBack);
294
295@@ -393,17 +393,17 @@ CompWatchFd::internalCallback (Glib::IOCondition events)
296 {
297 short int revents = 0;
298
299- if (events & Glib::IO_IN)
300+ if ((events & Glib::IOCondition::IO_IN) == Glib::IOCondition::IO_IN)
301 revents |= POLLIN;
302- if (events & Glib::IO_OUT)
303+ if ((events & Glib::IOCondition::IO_OUT) == Glib::IOCondition::IO_OUT)
304 revents |= POLLOUT;
305- if (events & Glib::IO_PRI)
306+ if ((events & Glib::IOCondition::IO_PRI) == Glib::IOCondition::IO_PRI)
307 revents |= POLLPRI;
308- if (events & Glib::IO_ERR)
309+ if ((events & Glib::IOCondition::IO_ERR) == Glib::IOCondition::IO_ERR)
310 revents |= POLLERR;
311- if (events & Glib::IO_HUP)
312+ if ((events & Glib::IOCondition::IO_HUP) == Glib::IOCondition::IO_HUP)
313 revents |= POLLHUP;
314- if (events & Glib::IO_NVAL)
315+ if ((events & Glib::IOCondition::IO_NVAL) == Glib::IOCondition::IO_NVAL)
316 return false;
317
318 mExecuting = true;
319diff --git a/tests/integration/glib/glib_integration_test.cpp b/tests/integration/glib/glib_integration_test.cpp
320index 4298545..29ede50 100644
321--- a/tests/integration/glib/glib_integration_test.cpp
322+++ b/tests/integration/glib/glib_integration_test.cpp
323@@ -139,7 +139,7 @@ TEST_F (GLibSourceDestroyIntegration, EventSourceGSourceDestroy)
324
325 TEST_F (GLibSourceDestroyIntegration, FdSourceGSourceDestroy)
326 {
327- Glib::IOCondition iocond = Glib::IO_IN;
328+ Glib::IOCondition iocond = Glib::IOCondition::IO_IN;
329 int fd = 0;
330 FdWatchCallBack cb;
331 Glib::RefPtr<StubWatchFd> sts(new StubWatchFd (&die, fd, iocond, cb));
332diff --git a/src/eventsource.cpp b/src/eventsource.cpp
333index 6898d74..440d66c 100644
334--- a/src/eventsource.cpp
335+++ b/src/eventsource.cpp
336@@ -34,7 +34,7 @@ CompEventSource::create ()
337 }
338
339 sigc::connection
340-CompEventSource::connect (const sigc::slot <bool> &slot)
341+CompEventSource::connect (const sigc::slot <bool()> &slot)
342 {
343 return connect_generic (slot);
344 }
345@@ -51,7 +51,7 @@ CompEventSource::CompEventSource (Display *dpy, int fd) :
346 add_poll (mPollFD);
347 set_can_recurse (true);
348
349- connect (sigc::mem_fun <bool, CompEventSource> (this, &CompEventSource::callback));
350+ connect (sigc::mem_fun <bool, CompEventSource> (*this, &CompEventSource::callback));
351 }
352
353 CompEventSource::~CompEventSource ()
354@@ -84,5 +84,5 @@ CompEventSource::check ()
355 bool
356 CompEventSource::dispatch (sigc::slot_base *slot)
357 {
358- return (*static_cast <sigc::slot <bool> *> (slot)) ();
359+ return (*static_cast <sigc::slot <bool()> *> (slot)) ();
360 }
361diff --git a/src/privateeventsource.h b/src/privateeventsource.h
362index ed9a0c1..12c551c 100644
363--- a/src/privateeventsource.h
364+++ b/src/privateeventsource.h
365@@ -39,7 +39,7 @@ class CompEventSource:
366
367 static Glib::RefPtr<CompEventSource> create ();
368
369- sigc::connection connect (const sigc::slot <bool> &slot);
370+ sigc::connection connect (const sigc::slot <bool()> &slot);
371
372 protected:
373
374diff --git a/src/screen.cpp b/src/screen.cpp
375index 556ae56..1faf200 100644
376--- a/src/screen.cpp
377+++ b/src/screen.cpp
378@@ -278,8 +278,7 @@ CompWatchFd::CompWatchFd (int fd,
379 mForceFail (false),
380 mExecuting (false)
381 {
382- connect (sigc::mem_fun <Glib::IOCondition, bool>
383- (this, &CompWatchFd::internalCallback));
384+ connect (sigc::mem_fun(*this, &CompWatchFd::internalCallback));
385 }
386
387 CompWatchFd::~CompWatchFd ()
388diff --git a/src/timer/src/privatetimeoutsource.h b/src/timer/src/privatetimeoutsource.h
389index 5e18d08..dab743c 100644
390--- a/src/timer/src/privatetimeoutsource.h
391+++ b/src/timer/src/privatetimeoutsource.h
392@@ -38,7 +38,7 @@ class CompTimeoutSource :
393 virtual ~CompTimeoutSource ();
394
395 static Glib::RefPtr<CompTimeoutSource> create (Glib::RefPtr <Glib::MainContext> &ctx);
396- sigc::connection connect (const sigc::slot <bool> &slot);
397+ sigc::connection connect (const sigc::slot <bool()> &slot);
398
399 protected:
400
401diff --git a/src/timer/src/timer.cpp b/src/timer/src/timer.cpp
402index 5288b81..fe778ad 100644
403--- a/src/timer/src/timer.cpp
404+++ b/src/timer/src/timer.cpp
405@@ -56,7 +56,7 @@ CompTimeoutSource::CompTimeoutSource (Glib::RefPtr <Glib::MainContext> &ctx) :
406 set_priority (G_PRIORITY_DEFAULT);
407 attach (ctx);
408
409- connect (sigc::mem_fun <bool, CompTimeoutSource> (this, &CompTimeoutSource::callback));
410+ connect (sigc::mem_fun <bool, CompTimeoutSource> (*this, &CompTimeoutSource::callback));
411 }
412
413 CompTimeoutSource::~CompTimeoutSource ()
414@@ -64,7 +64,7 @@ CompTimeoutSource::~CompTimeoutSource ()
415 }
416
417 sigc::connection
418-CompTimeoutSource::connect (const sigc::slot <bool> &slot)
419+CompTimeoutSource::connect (const sigc::slot <bool()> &slot)
420 {
421 return connect_generic (slot);
422 }
423@@ -130,7 +130,7 @@ CompTimeoutSource::check ()
424 bool
425 CompTimeoutSource::dispatch (sigc::slot_base *slot)
426 {
427- (*static_cast <sigc::slot <bool> *> (slot)) ();
428+ (*static_cast <sigc::slot <bool()> *> (slot)) ();
429 return true;
430 }
431