From 135f853a2609856021c1f81d9e95bcc63f4e73b5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 25 Sep 2007 13:30:16 +0000 Subject: - cleanup - don't export_to_install_X unset things (will help for next commits) --- lib/Xconfig/main.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/Xconfig/main.pm') diff --git a/lib/Xconfig/main.pm b/lib/Xconfig/main.pm index 6b871ec..cc31fc6 100644 --- a/lib/Xconfig/main.pm +++ b/lib/Xconfig/main.pm @@ -223,9 +223,10 @@ sub write { sub export_to_install_X { my ($X) = @_; - $::o->{X}{resolution_wanted} = $X->{resolutions}[0]{X} . 'x' . $X->{resolutions}[0]{Y}; - $::o->{X}{default_depth} = $X->{resolutions}[0]{Depth}; - $::o->{X}{bios_vga_mode} = $X->{resolutions}[0]{bios}; + my $resolution = $X->{resolutions}[0]; + $::o->{X}{resolution_wanted} = $resolution->{X} . 'x' . $resolution->{Y} if $resolution->{X}; + $::o->{X}{default_depth} = $resolution->{Depth} if $resolution->{Depth}; + $::o->{X}{bios_vga_mode} = $resolution->{bios} if $resolution->{bios}; $::o->{X}{monitors} = $X->{monitors} if $X->{monitors}[0]{manually_chosen} && $X->{monitors}[0]{vendor} ne "Plug'n Play"; $::o->{X}{card} = $X->{card} if $X->{card}{manually_chosen}; $::o->{X}{Xinerama} = 1 if $X->{card}{Xinerama}; @@ -234,7 +235,7 @@ sub export_to_install_X { sub check_valid { my ($raw_X) = @_; - my %sections = map { + my %_sections = map { my @l = $raw_X->get_Sections($_) or return "missing section $_"; $_ => \@l; } qw(InputDevice Monitor Device Screen ServerLayout); -- cgit v1.2.1