summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/XF86Config-parser/Merge.c39
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c14
2 files changed, 53 insertions, 0 deletions
diff --git a/src/XF86Config-parser/Merge.c b/src/XF86Config-parser/Merge.c
index e302e5e..67ba8e2 100644
--- a/src/XF86Config-parser/Merge.c
+++ b/src/XF86Config-parser/Merge.c
@@ -713,6 +713,38 @@ static int xconfigMergeLayout(XConfigPtr dstConfig, XConfigPtr srcConfig)
/*
+ * xconfigMergeExtensions() - Updates information in the destination's extension
+ * section with that of the source's extension section.
+ * Currently considering composite extension only.
+ *
+ */
+static int xconfigMergeExtensions(XConfigPtr dstConfig, XConfigPtr srcConfig)
+{
+ if (srcConfig->extensions) {
+ XConfigOptionPtr option;
+
+ /* Extension section was not found, create a new one */
+ if (!dstConfig->extensions) {
+ dstConfig->extensions =
+ (XConfigExtensionsPtr) calloc(1, sizeof(XConfigExtensionsRec));
+ if (!dstConfig->extensions) return 0;
+ }
+
+ option = srcConfig->extensions->options;
+ while (option) {
+ xconfigMergeOption(&(dstConfig->extensions->options),
+ &(srcConfig->extensions->options),
+ xconfigOptionName(option),
+ &(dstConfig->extensions->comment));
+ option = option->next;
+ }
+ }
+
+ return 1;
+
+} /* xconfigMergeExtensions() */
+
+/*
* xconfigMergeConfigs() - Merges the source X configuration with the
* destination X configuration.
*
@@ -763,6 +795,13 @@ int xconfigMergeConfigs(XConfigPtr dstConfig, XConfigPtr srcConfig)
return 0;
}
+ /* Merge the extensions */
+
+ if (!xconfigMergeExtensions(dstConfig, srcConfig)) {
+ return 0;
+ }
+
+
return 1;
} /* xconfigMergeConfigs() */
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index c848bad..a525326 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -7187,6 +7187,20 @@ static int generateXConfig(CtkDisplayConfig *ctk_object, XConfigPtr *pConfig)
goto fail;
}
+ if (go.supports_extension_section && layout->xinerama_enabled) {
+
+ if (!config->extensions) {
+ config->extensions = calloc(1, sizeof(XConfigExtensionsRec));
+ }
+
+ /* remove any existing composite extension option and then add the option*/
+ xconfigRemoveNamedOption(&(config->extensions->options), "Composite",
+ NULL);
+ xconfigAddNewOption(&config->extensions->options, "Composite", "Disable");
+
+ }
+
+
*pConfig = config;