summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-06-05 17:32:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-06-05 17:32:42 +0000
commit508807bd4d416356dbfb5fc7fc8513eba2593cc9 (patch)
treeda04890ffdad8a02bc75579ed19c266a2cdfeddd /lib
parentf6d02365b46b3891c0df4b8ad607bc80cdde8d81 (diff)
downloaddrakx-kbd-mouse-x11-508807bd4d416356dbfb5fc7fc8513eba2593cc9.tar
drakx-kbd-mouse-x11-508807bd4d416356dbfb5fc7fc8513eba2593cc9.tar.gz
drakx-kbd-mouse-x11-508807bd4d416356dbfb5fc7fc8513eba2593cc9.tar.bz2
drakx-kbd-mouse-x11-508807bd4d416356dbfb5fc7fc8513eba2593cc9.tar.xz
drakx-kbd-mouse-x11-508807bd4d416356dbfb5fc7fc8513eba2593cc9.zip
create set_extension() and use it
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/various.pm3
-rw-r--r--lib/Xconfig/xfree.pm5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm
index a762f0c..1ba652e 100644
--- a/lib/Xconfig/various.pm
+++ b/lib/Xconfig/various.pm
@@ -116,8 +116,7 @@ sub config {
$card->{Options}{AddARGBGLXVisuals} = undef;
}
} else {
- my $raw = $raw_X->get_Section('Extensions') || $raw_X->add_Section('Extensions', {});
- $raw->{Composite} = { 'Option' => 1, val => 'Disable' };
+ $raw_X->set_extension('Composite', 'Disable');
if ($card->{Driver} eq 'nvidia') {
delete $card->{Options}{AddARGBGLXVisuals};
diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm
index edb1541..684861f 100644
--- a/lib/Xconfig/xfree.pm
+++ b/lib/Xconfig/xfree.pm
@@ -540,6 +540,11 @@ sub get_extension {
my $raw = $raw_X->get_Section('Extensions');
$raw && $raw->{Composite} && $raw->{Composite}[0]{val};
}
+sub set_extension {
+ my ($raw_X, $extension, $val) = @_;
+ my $raw = $raw_X->get_Section('Extensions') || $raw_X->add_Section('Extensions', {});
+ $raw->{Composite} = { 'Option' => 1, val => $val };
+}
################################################################################
# ModulePath ###################################################################