summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-06-05 17:10:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-06-05 17:10:15 +0000
commit9d968363c52ee1febd9ff0fce38e2e56acee1270 (patch)
tree89ffa70b15e82e740bd18afec89d2f178819f5a5
parent847c09b39300c232690341420e50e951ed21bee5 (diff)
downloaddrakx-kbd-mouse-x11-9d968363c52ee1febd9ff0fce38e2e56acee1270.tar
drakx-kbd-mouse-x11-9d968363c52ee1febd9ff0fce38e2e56acee1270.tar.gz
drakx-kbd-mouse-x11-9d968363c52ee1febd9ff0fce38e2e56acee1270.tar.bz2
drakx-kbd-mouse-x11-9d968363c52ee1febd9ff0fce38e2e56acee1270.tar.xz
drakx-kbd-mouse-x11-9d968363c52ee1febd9ff0fce38e2e56acee1270.zip
create remove_extension() and use it
-rw-r--r--lib/Xconfig/various.pm6
-rw-r--r--lib/Xconfig/xfree.pm10
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm
index 33de577..5379d21 100644
--- a/lib/Xconfig/various.pm
+++ b/lib/Xconfig/various.pm
@@ -117,10 +117,8 @@ sub config {
$card->{Options}{AddARGBGLXVisuals} = undef;
}
} else {
- if (my $raw = $raw_X->get_Section('Extensions')) {
- delete $raw->{Composite};
- %$raw or $raw_X->remove_Section('Extensions');
- }
+ $raw_X->remove_extension('Composite');
+
if ($card->{Driver} eq 'nvidia') {
delete $card->{Options}{AddARGBGLXVisuals};
}
diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm
index de4fd4b..23c0910 100644
--- a/lib/Xconfig/xfree.pm
+++ b/lib/Xconfig/xfree.pm
@@ -527,6 +527,16 @@ sub set_load_module {
################################################################################
+# modules ######################################################################
+################################################################################
+sub remove_extension {
+ my ($raw_X, $extension) = @_;
+ my $raw = $raw_X->get_Section('Extensions') or return;
+ delete $raw->{$extension};
+ %$raw or $raw_X->remove_Section('Extensions');
+}
+
+################################################################################
# ModulePath ###################################################################
################################################################################
sub get_ModulePaths {