Merge lp:~compiz-team/compiz/build-fixes-part-1 into lp:compiz/0.9.8

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp:~compiz-team/compiz/build-fixes-part-1
Merge into: lp:compiz/0.9.8
Diff against target: 858 lines (+194/-127)
25 files modified
CMakeLists.txt (+1/-3)
cmake/CompizPlugin.cmake (+6/-1)
compizconfig/CMakeLists.txt (+4/-8)
compizconfig/libcompizconfig/CMakeLists.txt (+4/-8)
compizconfig/libcompizconfig/plugin/CMakeLists.txt (+0/-6)
compizconfig/libcompizconfig/plugin/ccp.xml (+0/-7)
compizconfig/libcompizconfig/src/CMakeLists.txt (+0/-1)
compizconfig/libcompizconfig/src/compiz.cpp (+37/-19)
compizconfig/libcompizconfig/src/config.c (+9/-3)
compizconfig/libcompizconfig/src/ini.c (+13/-5)
compizconfig/libcompizconfig/src/main.c (+36/-17)
include/core/CMakeLists.txt (+0/-1)
plugins/CMakeLists.txt (+1/-0)
plugins/ccp/CMakeLists.txt (+1/-7)
plugins/ccp/src/ccp.h (+0/-4)
plugins/grid/tests/grabhandler/CMakeLists.txt (+1/-1)
plugins/wall/CMakeLists.txt (+1/-0)
plugins/wall/src/offset_movement/CMakeLists.txt (+3/-21)
plugins/wall/src/offset_movement/tests/CMakeLists.txt (+1/-10)
src/CMakeLists.txt (+5/-2)
src/option/tests/CMakeLists.txt (+1/-0)
src/plugin/CMakeLists.txt (+1/-0)
src/privatescreen/tests/CMakeLists.txt (+1/-0)
src/region/CMakeLists.txt (+64/-0)
src/region/tests/CMakeLists.txt (+4/-3)
To merge this branch: bzr merge lp:~compiz-team/compiz/build-fixes-part-1
Reviewer Review Type Date Requested Status
Daniel van Vugt Needs Fixing
compiz packagers Pending
Review via email: mp+106520@code.launchpad.net

This proposal supersedes a proposal from 2012-05-20.

Description of the change

Testers should really test the last item in the branch pipeline lp:~compiz-team/compiz/build-fixes-part-10-animationaddon-plugin

This branch fixes the "random build failure" due to missing dependencies. The problem was that an external plugin was linking libcompiz_core internally and would cause libcompiz_core to get rebuilt with the wrong header files. Since that plugin didn't actually need all of the functionality in libcompiz_core, the region calculation functions were separated out into a separate static library and this was linked instead.

This branch also removes the dependency on core.h in compizconfig. All it was pulling it was MAXSHORT / MINSHORT which is far better expressed as std::numeric_limits <short>::max () and std::numeric_limits <short>::min ()

Moved the ccp plugin to plugins/ so that we don't have to repeat a bunch of build rules for internal building

Also fixed some warnings -> -Werror -> errors related to asprintf usage

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I spy code changes not related to the above description. Please review and remove the unrelated changes.

review: Needs Fixing

Unmerged revisions

3203. By Sam Spilsbury

Merge first part of build fixes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2012-05-17 08:34:51 +0000
3+++ CMakeLists.txt 2012-05-20 11:03:25 +0000
4@@ -170,9 +170,7 @@
5 add_subdirectory (po)
6 add_subdirectory (metadata)
7 add_subdirectory (src)
8-# compizconfig's CMake files confuse the compiz project quite a lot and
9-# cause multiple build failures. Don't include it till it's fixed.
10-#add_subdirectory (compizconfig)
11+add_subdirectory (compizconfig)
12 add_subdirectory (xslt)
13 add_subdirectory (plugins)
14 add_subdirectory (tests)
15
16=== modified file 'cmake/CompizPlugin.cmake'
17--- cmake/CompizPlugin.cmake 2012-02-07 06:39:28 +0000
18+++ cmake/CompizPlugin.cmake 2012-05-20 11:03:25 +0000
19@@ -449,10 +449,15 @@
20 macro (compiz_plugin plugin)
21 string (TOUPPER ${plugin} _PLUGIN)
22
23+ # If already defined, use the existing value...
24+ if (NOT DEFINED COMPIZ_DISABLE_PLUGIN_${_PLUGIN})
25+ set (COMPIZ_DISABLE_PLUGIN_${_PLUGIN} OFF)
26+ endif ()
27+
28 option (
29 COMPIZ_DISABLE_PLUGIN_${_PLUGIN}
30 "Disable building of plugin \"${plugin}\""
31- OFF
32+ ${COMPIZ_DISABLE_PLUGIN_${_PLUGIN}}
33 )
34
35 if (NOT COMPIZ_DISABLE_PLUGIN_${_PLUGIN})
36
37=== modified file 'compizconfig/CMakeLists.txt'
38--- compizconfig/CMakeLists.txt 2012-05-17 06:54:45 +0000
39+++ compizconfig/CMakeLists.txt 2012-05-20 11:03:25 +0000
40@@ -1,7 +1,3 @@
41-set (COMPIZ_CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
42-set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${COMPIZ_CMAKE_MODULE_PATH})
43-include (CompizDefaults)
44-
45 set (_COMPIZCONFIG_INTERNAL ON)
46 set (LIBCOMPIZCONFIG_CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libcompizconfig/cmake )
47 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LIBCOMPIZCONFIG_CMAKE_MODULE_PATH})
48@@ -9,10 +5,10 @@
49 set (COMPIZCONFIG_LIBRARY_DIRS ${CMAKE_CURRENT_BINARY_DIR}/libcompizconfig)
50
51 add_subdirectory (libcompizconfig)
52-add_subdirectory (compizconfig-python)
53-add_subdirectory (ccsm)
54-add_subdirectory (gconf)
55-add_subdirectory (gsettings)
56+#add_subdirectory (compizconfig-python)
57+#add_subdirectory (ccsm)
58+#add_subdirectory (gconf)
59+#add_subdirectory (gsettings)
60
61 add_custom_target (pyclean)
62
63
64=== modified file 'compizconfig/libcompizconfig/CMakeLists.txt'
65--- compizconfig/libcompizconfig/CMakeLists.txt 2012-05-17 06:54:45 +0000
66+++ compizconfig/libcompizconfig/CMakeLists.txt 2012-05-20 11:03:25 +0000
67@@ -3,18 +3,15 @@
68 set (COMPIZ_CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
69 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${COMPIZ_CMAKE_MODULE_PATH})
70 include (CompizDefaults)
71-
72-find_package (Compiz REQUIRED)
73-
74-set (CMAKE_MODULE_PATH_ORIG ${CMAKE_MODULE_PATH})
75-set (LIBCOMPIZCONFIG_CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
76-set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LIBCOMPIZCONFIGZ_CMAKE_MODULE_PATH})
77-
78 include (CompizCommon)
79 include (CompizPackage)
80 include (CheckLibraryExists)
81 include (CheckIncludeFile)
82
83+set (CMAKE_MODULE_PATH_ORIG ${CMAKE_MODULE_PATH})
84+set (LIBCOMPIZCONFIG_CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
85+set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LIBCOMPIZCONFIG_CMAKE_MODULE_PATH})
86+
87 set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
88
89 # libcompizconfig package version number
90@@ -144,7 +141,6 @@
91
92 add_subdirectory (config)
93 add_subdirectory (backend)
94-add_subdirectory (plugin)
95 add_subdirectory (src)
96 add_subdirectory (include)
97 add_subdirectory (cmake)
98
99=== removed directory 'compizconfig/libcompizconfig/plugin'
100=== removed file 'compizconfig/libcompizconfig/plugin/CMakeLists.txt'
101--- compizconfig/libcompizconfig/plugin/CMakeLists.txt 2010-05-10 07:42:31 +0000
102+++ compizconfig/libcompizconfig/plugin/CMakeLists.txt 1970-01-01 00:00:00 +0000
103@@ -1,6 +0,0 @@
104-find_package (Compiz REQUIRED)
105-
106-include (CompizCommon)
107-include (CompizPackage)
108-
109-compiz_add_plugins_in_folder (${CMAKE_CURRENT_SOURCE_DIR})
110
111=== removed file 'compizconfig/libcompizconfig/plugin/ccp.xml'
112--- compizconfig/libcompizconfig/plugin/ccp.xml 2010-04-22 04:12:52 +0000
113+++ compizconfig/libcompizconfig/plugin/ccp.xml 1970-01-01 00:00:00 +0000
114@@ -1,7 +0,0 @@
115-<?xml version="1.0" encoding="UTF-8"?>
116-<compiz>
117- <plugin name="ccp">
118- <_short>CCP</_short>
119- <_long>Compizconfig Settings Plugins</_long>
120- </plugin>
121-</compiz>
122
123=== modified file 'compizconfig/libcompizconfig/src/CMakeLists.txt'
124--- compizconfig/libcompizconfig/src/CMakeLists.txt 2012-05-16 19:35:03 +0000
125+++ compizconfig/libcompizconfig/src/CMakeLists.txt 2012-05-20 11:03:25 +0000
126@@ -1,5 +1,4 @@
127 include_directories (
128- ${CMAKE_SOURCE_DIR}/include
129 ${CMAKE_CURRENT_BINARY_DIR}
130 ${CMAKE_CURRENT_SOURCE_DIR}
131 ${LIBCOMPIZCONFIG_INCLUDE_DIRS}
132
133=== modified file 'compizconfig/libcompizconfig/src/compiz.cpp'
134--- compizconfig/libcompizconfig/src/compiz.cpp 2012-01-23 11:37:14 +0000
135+++ compizconfig/libcompizconfig/src/compiz.cpp 2012-05-20 11:03:25 +0000
136@@ -18,6 +18,8 @@
137 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
138 */
139
140+#include <limits>
141+
142 #ifdef USE_PROTOBUF
143 #include "compizconfig.pb.h"
144 #include <google/protobuf/io/zero_copy_stream_impl.h>
145@@ -47,7 +49,7 @@
146
147 #include <string>
148
149-#include <core/core.h>
150+
151
152 namespace {
153
154@@ -407,8 +409,8 @@
155 initIntInfoPB (CCSSettingInfo * i, const OptionMetadata & option)
156 {
157 int num, j;
158- i->forInt.min = MINSHORT;
159- i->forInt.max = MAXSHORT;
160+ i->forInt.min = std::numeric_limits <short>::min ();
161+ i->forInt.max = std::numeric_limits <short>::max ();
162 i->forInt.desc = NULL;
163
164 if (option.has_int_min ())
165@@ -448,8 +450,8 @@
166 static void
167 initFloatInfoPB (CCSSettingInfo * i, const OptionMetadata & option)
168 {
169- i->forFloat.min = MINSHORT;
170- i->forFloat.max = MAXSHORT;
171+ i->forFloat.min = std::numeric_limits <short>::min ();
172+ i->forFloat.max = std::numeric_limits <short>::max ();
173 i->forFloat.precision = 0.1f;
174
175 if (option.has_float_min ())
176@@ -879,7 +881,8 @@
177 if (xmlFile)
178 {
179 pPrivate->xmlFile = strdup (xmlFile);
180- asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name);
181+ if (asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name) == -1)
182+ pPrivate->xmlPath = NULL;
183 }
184
185 plugin->context = context;
186@@ -1585,8 +1588,8 @@
187 char *name;
188 char *value;
189 int num, j;
190- i->forInt.min = MINSHORT;
191- i->forInt.max = MAXSHORT;
192+ i->forInt.min = std::numeric_limits <short>::min ();
193+ i->forInt.max = std::numeric_limits <short>::max ();
194 i->forInt.desc = NULL;
195
196 value = getStringFromXPath (node->doc, node, "min/child::text()");
197@@ -1672,8 +1675,8 @@
198 char *value;
199 SetNumericLocale numeric_locale;
200
201- i->forFloat.min = MINSHORT;
202- i->forFloat.max = MAXSHORT;
203+ i->forFloat.min = std::numeric_limits <short>::min ();
204+ i->forFloat.max = std::numeric_limits <short>::max ();
205 i->forFloat.precision = 0.1f;
206
207 value = getStringFromXPath (node->doc, node, "min/child::text()");
208@@ -1924,14 +1927,16 @@
209
210 if (cacheHome && strlen (cacheHome))
211 {
212- asprintf (&cacheBaseDir, "%s", cacheHome);
213+ if (asprintf (&cacheBaseDir, "%s", cacheHome) == -1)
214+ cacheBaseDir = NULL;
215 }
216 else
217 {
218 char *home = getenv ("HOME");
219 if (home && strlen (home))
220 {
221- asprintf (&cacheBaseDir, "%s/.cache", home);
222+ if (asprintf (&cacheBaseDir, "%s/.cache", home) == -1)
223+ cacheBaseDir = NULL;
224 }
225 }
226
227@@ -2514,7 +2519,9 @@
228 if (file)
229 pPrivate->xmlFile = strdup (file);
230
231- asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name);
232+ if (asprintf (&pPrivate->xmlPath, "/compiz/plugin[@name = '%s']", name) == -1)
233+ pPrivate->xmlPath = NULL;
234+
235 plugin->context = context;
236 plugin->name = strdup (name);
237
238@@ -2753,7 +2760,9 @@
239 char *xmlFilePath = NULL;
240 void *pluginInfoPBv = NULL;
241
242- asprintf (&xmlFilePath, "%s/%s", xmlDirPath, xmlName);
243+ if (asprintf (&xmlFilePath, "%s/%s", xmlDirPath, xmlName) == -1)
244+ xmlFilePath = NULL;
245+
246 if (!xmlFilePath)
247 {
248 fprintf (stderr, "[ERROR]: Can't allocate memory\n");
249@@ -2789,7 +2798,9 @@
250 if (createProtoBufCacheDir () &&
251 metadataCacheDir.length () > 0)
252 {
253- asprintf (&pbFilePath, "%s/%s.pb", metadataCacheDir.c_str (), name);
254+ if (asprintf (&pbFilePath, "%s/%s.pb", metadataCacheDir.c_str (), name) == -1)
255+ pbFilePath = NULL;
256+
257 if (!pbFilePath)
258 {
259 fprintf (stderr, "[ERROR]: Can't allocate memory\n");
260@@ -2989,14 +3000,17 @@
261
262 char *xmlDirPath = NULL;
263 char *xmlName = NULL;
264- asprintf (&xmlName, "%s.xml", name);
265+ if (asprintf (&xmlName, "%s.xml", name) == -1)
266+ xmlName = NULL;
267
268 if (xmlName)
269 {
270 char *home = getenv ("HOME");
271 if (home && strlen (home))
272 {
273- asprintf (&xmlDirPath, "%s/.compiz-1/metadata", home);
274+ if (asprintf (&xmlDirPath, "%s/.compiz-1/metadata", home) == -1)
275+ xmlDirPath = NULL;
276+
277 if (xmlDirPath)
278 {
279 loadPluginFromXMLFile (context, xmlName, xmlDirPath);
280@@ -3024,7 +3038,9 @@
281 if (home && strlen (home))
282 {
283 char *homeplugins = NULL;
284- asprintf (&homeplugins, "%s/.compiz-1/metadata", home);
285+ if (asprintf (&homeplugins, "%s/.compiz-1/metadata", home) == -1)
286+ homeplugins = NULL;
287+
288 if (homeplugins)
289 {
290 loadPluginsFromXMLFiles (context, homeplugins);
291@@ -3036,7 +3052,9 @@
292 if (home && strlen (home))
293 {
294 char *homeplugins = NULL;
295- asprintf (&homeplugins, "%s/.compiz-1/plugins", home);
296+ if (asprintf (&homeplugins, "%s/.compiz-1/plugins", home) == -1)
297+ homeplugins = NULL;
298+
299 if (homeplugins)
300 {
301 loadPluginsFromName (context, homeplugins);
302
303=== modified file 'compizconfig/libcompizconfig/src/config.c'
304--- compizconfig/libcompizconfig/src/config.c 2010-05-22 03:57:23 +0000
305+++ compizconfig/libcompizconfig/src/config.c 2012-05-20 11:03:25 +0000
306@@ -38,14 +38,18 @@
307 configDir = getenv ("XDG_CONFIG_HOME");
308 if (configDir && strlen (configDir))
309 {
310- asprintf (&fileName, "%s/%s/config", configDir, SETTINGPATH);
311+ if (asprintf (&fileName, "%s/%s/config", configDir, SETTINGPATH) == -1)
312+ fileName = NULL;
313+
314 return fileName;
315 }
316
317 configDir = getenv ("HOME");
318 if (configDir && strlen (configDir))
319 {
320- asprintf (&fileName, "%s/.config/%s/config", configDir, SETTINGPATH);
321+ if (asprintf (&fileName, "%s/.config/%s/config", configDir, SETTINGPATH))
322+ fileName = NULL;
323+
324 return fileName;
325 }
326
327@@ -61,7 +65,9 @@
328 profile = getenv ("COMPIZ_CONFIG_PROFILE");
329 if (profile && strlen (profile))
330 {
331- asprintf (&section, "general_%s", profile);
332+ if (asprintf (&section, "general_%s", profile) == -1)
333+ section = NULL;
334+
335 return section;
336 }
337
338
339=== modified file 'compizconfig/libcompizconfig/src/ini.c'
340--- compizconfig/libcompizconfig/src/ini.c 2011-08-20 19:03:37 +0000
341+++ compizconfig/libcompizconfig/src/ini.c 2012-05-20 11:03:25 +0000
342@@ -110,7 +110,8 @@
343 char *sectionName;
344 char *retValue;
345
346- asprintf (&sectionName, "%s:%s", section, entry);
347+ if (asprintf (&sectionName, "%s:%s", section, entry) == -1)
348+ return NULL;
349
350 retValue = iniparser_getstring (dictionary, sectionName, NULL);
351 free (sectionName);
352@@ -126,7 +127,8 @@
353 {
354 char *sectionName;
355
356- asprintf (&sectionName, "%s:%s", section, entry);
357+ if (asprintf (&sectionName, "%s:%s", section, entry) == -1)
358+ return;
359
360 if (!iniparser_find_entry (dictionary, (char*) section))
361 iniparser_add_entry (dictionary, (char*) section, NULL, NULL);
362@@ -605,7 +607,9 @@
363 {
364 char *string = NULL;
365
366- asprintf (&string, "%i", value);
367+ if (asprintf (&string, "%i", value) == -1)
368+ string = NULL;
369+
370 if (string)
371 {
372 setIniString (dictionary, section, entry, string);
373@@ -621,7 +625,9 @@
374 {
375 char *string = NULL;
376
377- asprintf (&string, "%f", value);
378+ if (asprintf (&string, "%f", value))
379+ string = NULL;
380+
381 if (string)
382 {
383 setIniString (dictionary, section, entry, string);
384@@ -815,7 +821,9 @@
385 {
386 char *sectionName;
387
388- asprintf (&sectionName, "%s:%s", section, entry);
389+ if (asprintf (&sectionName, "%s:%s", section, entry) == -1)
390+ return;
391+
392 iniparser_unset (dictionary, sectionName);
393 free (sectionName);
394 }
395
396=== modified file 'compizconfig/libcompizconfig/src/main.c'
397--- compizconfig/libcompizconfig/src/main.c 2011-11-10 00:58:18 +0000
398+++ compizconfig/libcompizconfig/src/main.c 2012-05-20 11:03:25 +0000
399@@ -602,8 +602,10 @@
400
401 if (home && strlen (home))
402 {
403- asprintf (&dlname, "%s/.compizconfig/backends/lib%s.so",
404- home, backend);
405+ if (asprintf (&dlname, "%s/.compizconfig/backends/lib%s.so",
406+ home, backend) == -1)
407+ dlname = NULL;
408+
409 dlerror ();
410 dlhand = dlopen (dlname, RTLD_NOW | RTLD_NODELETE | RTLD_LOCAL);
411 err = dlerror ();
412@@ -614,8 +616,9 @@
413 if (dlname) {
414 free (dlname);
415 }
416- asprintf (&dlname, "%s/compizconfig/backends/lib%s.so",
417- LIBDIR, backend);
418+ if (asprintf (&dlname, "%s/compizconfig/backends/lib%s.so",
419+ LIBDIR, backend) == -1)
420+ dlname = NULL;
421 dlhand = dlopen (dlname, RTLD_NOW | RTLD_NODELETE | RTLD_LOCAL);
422 err = dlerror ();
423 }
424@@ -2696,15 +2699,24 @@
425
426 if (home && strlen (home))
427 {
428- asprintf (&backenddir, "%s/.compizconfig/backends", home);
429+ if (asprintf (&backenddir, "%s/.compizconfig/backends", home))
430+ backenddir = NULL;
431+
432+ if (backenddir)
433+ {
434+ getBackendInfoFromDir (&rv, backenddir);
435+ free (backenddir);
436+ }
437+ }
438+
439+ if (asprintf (&backenddir, "%s/compizconfig/backends", LIBDIR))
440+ backenddir = NULL;
441+
442+ if (backenddir)
443+ {
444 getBackendInfoFromDir (&rv, backenddir);
445 free (backenddir);
446 }
447-
448- asprintf (&backenddir, "%s/compizconfig/backends", LIBDIR);
449-
450- getBackendInfoFromDir (&rv, backenddir);
451- free (backenddir);
452 return rv;
453 }
454
455@@ -2739,8 +2751,9 @@
456 if (skipDefaults && setting->isDefault)
457 continue;
458
459- asprintf (&keyName, "s%d_%s",
460- context->screenNum, setting->name);
461+ if (asprintf (&keyName, "s%d_%s",
462+ context->screenNum, setting->name) == -1)
463+ return FALSE;
464
465 switch (setting->type)
466 {
467@@ -2819,7 +2832,9 @@
468 char *sectionName = strdup (setting->parent->name);
469 char *iniValue = NULL;
470
471- asprintf (&keyName, "+s%d_%s", context->screenNum, setting->name);
472+ if (asprintf (&keyName, "+s%d_%s", context->screenNum, setting->name) == -1)
473+ return FALSE;
474+
475 if (ccsIniGetString (dict, sectionName, keyName, &iniValue))
476 {
477 CCSSetting *newSetting = malloc (sizeof (CCSSetting));
478@@ -2971,7 +2986,9 @@
479 char *sectionName = strdup (setting->parent->name);
480 char *iniValue = NULL;
481
482- asprintf (&keyName, "-s%d_%s", context->screenNum, setting->name);
483+ if (asprintf (&keyName, "-s%d_%s", context->screenNum, setting->name) == -1)
484+ return FALSE;
485+
486 if (ccsIniGetString (dict, sectionName, keyName, &iniValue))
487 {
488 CCSSetting *newSetting = malloc (sizeof (CCSSetting));
489@@ -3438,7 +3455,8 @@
490 if (!home)
491 return FALSE;
492
493- asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home);
494+ if (asprintf (&dupath, "%s/.config/compiz-1/compizconfig/done_upgrades", home) == -1)
495+ return FALSE;
496
497 completedUpgrades = fopen (dupath, "a+");
498
499@@ -3539,8 +3557,9 @@
500 if (!setting->isDefault && !overwriteNonDefault)
501 continue;
502
503- asprintf (&keyName, "s%d_%s",
504- context->screenNum, setting->name);
505+ if (asprintf (&keyName, "s%d_%s",
506+ context->screenNum, setting->name) == -1)
507+ return FALSE;
508
509 switch (setting->type)
510 {
511
512=== modified file 'include/core/CMakeLists.txt'
513--- include/core/CMakeLists.txt 2012-01-30 05:12:24 +0000
514+++ include/core/CMakeLists.txt 2012-05-20 11:03:25 +0000
515@@ -12,7 +12,6 @@
516 plugin.h
517 propertywriter.h
518 privateunion.h
519- region.h
520 screen.h
521 serialization.h
522 session.h
523
524=== modified file 'plugins/CMakeLists.txt'
525--- plugins/CMakeLists.txt 2012-01-20 09:46:31 +0000
526+++ plugins/CMakeLists.txt 2012-05-20 11:03:25 +0000
527@@ -16,6 +16,7 @@
528 ${CMAKE_CURRENT_SOURCE_DIR}/../src/pluginclasshandler/include
529 ${CMAKE_CURRENT_SOURCE_DIR}/../src/point/include
530 ${CMAKE_CURRENT_SOURCE_DIR}/../src/rect/include
531+ ${CMAKE_CURRENT_SOURCE_DIR}/../src/region/include
532 ${CMAKE_CURRENT_SOURCE_DIR}/../src/window/geometry/include
533 ${CMAKE_CURRENT_SOURCE_DIR}/../src/window/geometry-saver/include
534 ${CMAKE_CURRENT_SOURCE_DIR}/../src/window/extents/include
535
536=== renamed directory 'compizconfig/libcompizconfig/plugin/ccp' => 'plugins/ccp'
537=== modified file 'plugins/ccp/CMakeLists.txt'
538--- compizconfig/libcompizconfig/plugin/ccp/CMakeLists.txt 2010-05-17 18:21:50 +0000
539+++ plugins/ccp/CMakeLists.txt 2012-05-20 11:03:25 +0000
540@@ -1,12 +1,6 @@
541 find_package (Compiz REQUIRED)
542
543-include (CompizPlugin)
544-include (CompizCommon)
545-
546-set (COMPIZ_PLUGIN_INSTALL_TYPE
547- "compiz")
548-
549-compiz_plugin (ccp LIBRARIES compizconfig)
550+compiz_plugin (ccp LIBRARIES compizconfig CFLAGSADD -I${CMAKE_SOURCE_DIR}/compizconfig/libcompizconfig/include)
551
552 if (COMPIZ_BUILD_WITH_RPATH)
553 set_target_properties (
554
555=== modified file 'plugins/ccp/src/ccp.h'
556--- compizconfig/libcompizconfig/plugin/ccp/src/ccp.h 2010-05-10 07:42:31 +0000
557+++ plugins/ccp/src/ccp.h 2012-05-20 11:03:25 +0000
558@@ -18,10 +18,6 @@
559 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
560 */
561
562-#ifdef HAVE_CONFIG_H
563-# include "../config.h"
564-#endif
565-
566 extern "C" {
567 #include <string.h>
568 #include <stdio.h>
569
570=== modified file 'plugins/grid/tests/grabhandler/CMakeLists.txt'
571--- plugins/grid/tests/grabhandler/CMakeLists.txt 2012-01-24 11:25:54 +0000
572+++ plugins/grid/tests/grabhandler/CMakeLists.txt 2012-05-20 11:03:25 +0000
573@@ -1,4 +1,4 @@
574-include_directories (${compiz_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src)
575+include_directories (${compiz_INCLUDE_DIRS} ${CMAKE_CURENT_SOURCE_DIR}/../../src)
576
577 add_executable (test-grid-grab-handler
578 test-grid-grab-handler.cpp
579
580=== modified file 'plugins/wall/CMakeLists.txt'
581--- plugins/wall/CMakeLists.txt 2012-05-16 17:41:07 +0000
582+++ plugins/wall/CMakeLists.txt 2012-05-20 11:03:25 +0000
583@@ -1,6 +1,7 @@
584 find_package (Compiz REQUIRED)
585
586 include (CompizPlugin)
587+include (CompizDefaults)
588
589 add_subdirectory (src/offset_movement)
590 include_directories (src/offset_movement/include)
591
592=== modified file 'plugins/wall/src/offset_movement/CMakeLists.txt'
593--- plugins/wall/src/offset_movement/CMakeLists.txt 2012-05-09 01:50:55 +0000
594+++ plugins/wall/src/offset_movement/CMakeLists.txt 2012-05-20 11:03:25 +0000
595@@ -1,25 +1,13 @@
596-pkg_check_modules (
597- GLIBMM
598- REQUIRED
599- glibmm-2.4 glib-2.0 compiz
600-)
601-
602 INCLUDE_DIRECTORIES (
603 ${CMAKE_CURRENT_SOURCE_DIR}/include
604 ${CMAKE_CURRENT_SOURCE_DIR}/src
605-
606- ${CMAKE_SOURCE_DIR}/include
607
608 ${Boost_INCLUDE_DIRS}
609
610 ${GLIBMM_INCLUDE_DIRS}
611 )
612
613-LINK_DIRECTORIES (${GLIBMM_LIBRARY_DIRS})
614-
615-SET (
616- PUBLIC_HEADERS
617-)
618+LINK_DIRECTORIES (${GLIBMM_LIBRARY_DIRS} ${COMPIZ_LIBRARY_DIRS})
619
620 SET (
621 PRIVATE_HEADERS
622@@ -36,7 +24,6 @@
623
624 ${SRCS}
625
626- ${PUBLIC_HEADERS}
627 ${PRIVATE_HEADERS}
628 )
629
630@@ -44,14 +31,9 @@
631 ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
632 endif (COMPIZ_BUILD_TESTING)
633
634-SET_TARGET_PROPERTIES(
635- compiz_wall_offset_movement PROPERTIES
636- PUBLIC_HEADER "${PUBLIC_HEADERS}"
637-)
638-
639 TARGET_LINK_LIBRARIES(
640 compiz_wall_offset_movement
641
642- compiz_core
643- ${GLIBMM_LIBRARIES}
644+ compiz_rect
645+ compiz_region
646 )
647
648=== modified file 'plugins/wall/src/offset_movement/tests/CMakeLists.txt'
649--- plugins/wall/src/offset_movement/tests/CMakeLists.txt 2012-05-17 06:54:45 +0000
650+++ plugins/wall/src/offset_movement/tests/CMakeLists.txt 2012-05-20 11:03:25 +0000
651@@ -1,9 +1,3 @@
652-pkg_check_modules (
653- COMPIZ
654- REQUIRED
655- glibmm-2.4 glib-2.0
656-)
657-
658 find_library (GMOCK_LIBRARY gmock)
659 find_library (GMOCK_MAIN_LIBRARY gmock_main)
660
661@@ -13,8 +7,6 @@
662 endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
663
664 include_directories (${GTEST_INCLUDE_DIRS})
665-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
666-include_directories (${COMPIZ_INCLUDE_DIRS})
667
668 link_directories (${COMPIZ_LIBRARY_DIRS})
669
670@@ -26,8 +18,7 @@
671 ${GTEST_BOTH_LIBRARIES}
672 ${GMOCK_LIBRARY}
673 ${GMOCK_MAIN_LIBRARY}
674- ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
675- compiz_core
676+ ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
677 )
678
679 gtest_add_tests (compiz_test_wall_offset_movement "" ${CMAKE_CURRENT_SOURCE_DIR}/test-wall-offset-movement.cpp)
680
681=== modified file 'src/CMakeLists.txt'
682--- src/CMakeLists.txt 2012-03-13 10:17:02 +0000
683+++ src/CMakeLists.txt 2012-05-20 11:03:25 +0000
684@@ -7,12 +7,12 @@
685 add_subdirectory( pluginclasshandler )
686 add_subdirectory( point )
687 add_subdirectory( rect )
688+add_subdirectory( region )
689 add_subdirectory( window )
690
691 IF (COMPIZ_BUILD_TESTING)
692 add_subdirectory( privatescreen/tests )
693 add_subdirectory( wrapsystem/tests )
694-add_subdirectory( region/tests )
695 add_subdirectory( plugin )
696 add_subdirectory( option/tests )
697 ENDIF (COMPIZ_BUILD_TESTING)
698@@ -57,6 +57,9 @@
699 ${CMAKE_CURRENT_SOURCE_DIR}/rect/include
700 ${CMAKE_CURRENT_SOURCE_DIR}/rect/src
701
702+ ${CMAKE_CURRENT_SOURCE_DIR}/region/include
703+ ${CMAKE_CURRENT_SOURCE_DIR}/region/src
704+
705 ${CMAKE_CURRENT_SOURCE_DIR}/window/geometry/include
706 ${CMAKE_CURRENT_SOURCE_DIR}/window/geometry/src
707
708@@ -89,7 +92,6 @@
709
710 add_library (compiz_core SHARED
711 ${CMAKE_CURRENT_SOURCE_DIR}/global.cpp
712- ${CMAKE_CURRENT_SOURCE_DIR}/region.cpp
713 ${CMAKE_CURRENT_SOURCE_DIR}/atoms.cpp
714 ${CMAKE_CURRENT_SOURCE_DIR}/actions.cpp
715 ${CMAKE_CURRENT_SOURCE_DIR}/screen.cpp
716@@ -155,6 +157,7 @@
717 compiz_pluginclasshandler
718 compiz_point
719 compiz_rect
720+ compiz_region
721 compiz_window_geometry
722 compiz_window_geometry_saver
723 compiz_window_extents
724
725=== modified file 'src/option/tests/CMakeLists.txt'
726--- src/option/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000
727+++ src/option/tests/CMakeLists.txt 2012-05-20 11:03:25 +0000
728@@ -6,6 +6,7 @@
729 ${compiz_SOURCE_DIR}/src/logmessage/include
730 ${compiz_SOURCE_DIR}/src/string/include
731 ${compiz_SOURCE_DIR}/src/rect/include
732+ ${compiz_SOURCE_DIR}/src/region/include
733 ${compiz_SOURCE_DIR}/src/point/include
734 ${compiz_SOURCE_DIR}/src/window/geometry/include
735 ${compiz_SOURCE_DIR}/src/window/extents/include
736
737=== modified file 'src/plugin/CMakeLists.txt'
738--- src/plugin/CMakeLists.txt 2012-03-13 10:17:02 +0000
739+++ src/plugin/CMakeLists.txt 2012-05-20 11:03:25 +0000
740@@ -9,6 +9,7 @@
741 ${compiz_SOURCE_DIR}/src/timer/src
742
743 ${compiz_SOURCE_DIR}/src/rect/include
744+ ${compiz_SOURCE_DIR}/src/region/include
745 ${compiz_SOURCE_DIR}/src/window/geometry/include
746 ${compiz_SOURCE_DIR}/src/window/extents/include
747
748
749=== modified file 'src/privatescreen/tests/CMakeLists.txt'
750--- src/privatescreen/tests/CMakeLists.txt 2012-03-06 17:44:14 +0000
751+++ src/privatescreen/tests/CMakeLists.txt 2012-05-20 11:03:25 +0000
752@@ -12,6 +12,7 @@
753 ${compiz_SOURCE_DIR}/src/timer/src
754
755 ${compiz_SOURCE_DIR}/src/rect/include
756+ ${compiz_SOURCE_DIR}/src/region/include
757 ${compiz_SOURCE_DIR}/src/screen/geometry/include
758 ${compiz_SOURCE_DIR}/src/window/geometry/include
759 ${compiz_SOURCE_DIR}/src/window/extents/include
760
761=== added file 'src/region/CMakeLists.txt'
762--- src/region/CMakeLists.txt 1970-01-01 00:00:00 +0000
763+++ src/region/CMakeLists.txt 2012-05-20 11:03:25 +0000
764@@ -0,0 +1,64 @@
765+pkg_check_modules (
766+ X11
767+ REQUIRED
768+ x11
769+)
770+
771+INCLUDE_DIRECTORIES (
772+ ${CMAKE_CURRENT_SOURCE_DIR}/include
773+ ${CMAKE_CURRENT_SOURCE_DIR}/src
774+
775+ ${compiz_SOURCE_DIR}/src/point/include
776+ ${compiz_SOURCE_DIR}/include
777+
778+ ${compiz_SOURCE_DIR}/src/rect/include
779+ ${compiz_SOURCE_DIR}/include
780+
781+ ${Boost_INCLUDE_DIRS}
782+
783+ ${GLIBMM_INCLUDE_DIRS}
784+)
785+
786+LINK_DIRECTORIES (${X11_LIBRARY_DIRS})
787+
788+SET (
789+ PUBLIC_HEADERS
790+ ${CMAKE_CURRENT_SOURCE_DIR}/include/core/region.h
791+)
792+
793+SET (
794+ PRIVATE_HEADERS
795+)
796+
797+SET(
798+ SRCS
799+ ${CMAKE_CURRENT_SOURCE_DIR}/src/region.cpp
800+)
801+
802+ADD_LIBRARY(
803+ compiz_region STATIC
804+
805+ ${SRCS}
806+
807+ ${PUBLIC_HEADERS}
808+ ${PRIVATE_HEADERS}
809+)
810+
811+IF (COMPIZ_BUILD_TESTING)
812+ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/tests )
813+ENDIF (COMPIZ_BUILD_TESTING)
814+
815+SET_TARGET_PROPERTIES(
816+ compiz_region PROPERTIES
817+ PUBLIC_HEADER "${PUBLIC_HEADERS}"
818+)
819+
820+install (FILES ${PUBLIC_HEADERS} DESTINATION ${COMPIZ_CORE_INCLUDE_DIR})
821+
822+TARGET_LINK_LIBRARIES(
823+ compiz_region
824+ compiz_point
825+ compiz_rect
826+
827+ ${X11_LIBRARIES}
828+)
829
830=== added directory 'src/region/include'
831=== added directory 'src/region/include/core'
832=== renamed file 'include/core/region.h' => 'src/region/include/core/region.h'
833=== added directory 'src/region/src'
834=== renamed file 'src/region.cpp' => 'src/region/src/region.cpp'
835=== modified file 'src/region/tests/CMakeLists.txt'
836--- src/region/tests/CMakeLists.txt 2012-02-15 17:45:25 +0000
837+++ src/region/tests/CMakeLists.txt 2012-05-20 11:03:25 +0000
838@@ -2,6 +2,7 @@
839 ${CMAKE_CURRENT_SOURCE_DIR}
840
841 ${compiz_SOURCE_DIR}/src/rect/include
842+ ${compiz_SOURCE_DIR}/src/region/include
843 ${compiz_SOURCE_DIR}/include
844 ${compiz_SOURCE_DIR}/src
845 )
846@@ -23,9 +24,9 @@
847 target_link_libraries(
848 compiz_region_test
849
850- compiz_core
851- compiz_window_constrainment
852- compiz_logmessage
853+ compiz_region
854+ compiz_rect
855+ compiz_point
856
857 ${GTEST_BOTH_LIBRARIES}
858 ${GMOCK_LIBRARY}

Subscribers

People subscribed via source and target branches