From f6d02365b46b3891c0df4b8ad607bc80cdde8d81 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 5 Jun 2008 17:30:23 +0000 Subject: - XFdrake: o Composite is now the default in xserver 1.4 (#35043) --- lib/Xconfig/various.pm | 8 ++++---- lib/Xconfig/xfree.pm | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm index 5379d21..a762f0c 100644 --- a/lib/Xconfig/various.pm +++ b/lib/Xconfig/various.pm @@ -70,7 +70,7 @@ sub various { my $various = { if_($::isStandalone, xdm => runlevel() == 5), if_($b_read_existing, - Composite => ($raw_X->get_Section('Extensions') || {})->{Composite}, + Composite => $raw_X->get_extension('Composite') ne 'Disable', if_($card->{Options}{MonitorLayout} eq 'NONE,CRT+LFP' || $card->{Options}{TwinViewOrientation} eq 'Clone', Clone => 1), @@ -111,13 +111,13 @@ sub config { my ($raw_X, $card, $various) = @_; if ($various->{Composite}) { - my $raw = $raw_X->get_Section('Extensions') || $raw_X->add_Section('Extensions', {}); - $raw->{Composite} = { 'Option' => 1 }; + $raw_X->remove_extension('Composite'); if ($card->{Driver} eq 'nvidia') { $card->{Options}{AddARGBGLXVisuals} = undef; } } else { - $raw_X->remove_extension('Composite'); + my $raw = $raw_X->get_Section('Extensions') || $raw_X->add_Section('Extensions', {}); + $raw->{Composite} = { 'Option' => 1, val => 'Disable' }; if ($card->{Driver} eq 'nvidia') { delete $card->{Options}{AddARGBGLXVisuals}; diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm index 23c0910..edb1541 100644 --- a/lib/Xconfig/xfree.pm +++ b/lib/Xconfig/xfree.pm @@ -535,6 +535,11 @@ sub remove_extension { delete $raw->{$extension}; %$raw or $raw_X->remove_Section('Extensions'); } +sub get_extension { + my ($raw_X, $extension) = @_; + my $raw = $raw_X->get_Section('Extensions'); + $raw && $raw->{Composite} && $raw->{Composite}[0]{val}; +} ################################################################################ # ModulePath ################################################################### -- cgit v1.2.1