From 954099b536c62c15a8472444ef2863e25d0d2285 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 14 Jun 2007 07:48:18 +0000 Subject: prepare next commit --- lib/Xconfig/xfree.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Xconfig') diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm index 43bd5f4..8089f12 100644 --- a/lib/Xconfig/xfree.pm +++ b/lib/Xconfig/xfree.pm @@ -197,6 +197,8 @@ sub get_resolutions { sub set_resolutions { my ($raw_X, $resolutions, $o_Screen) = @_; + my $Depth = $resolutions->[0]{Depth} eq '32' ? 24 : $resolutions->[0]{Depth}; + foreach my $Screen ($o_Screen ? $o_Screen : $raw_X->get_Sections('Screen')) { $Screen ||= $raw_X->get_default_screen or internal_error('no screen'); @@ -207,7 +209,7 @@ sub set_resolutions { my @Modes = map { sprintf($Mode_name eq 'Modes' ? '"%dx%d"' : '%d %d', @$_{'X', 'Y'}) } @l; delete $Screen->{DefaultDepth}; - $Screen->{DefaultColorDepth} = { val => $resolutions->[0]{Depth} eq '32' ? 24 : $resolutions->[0]{Depth} }; + $Screen->{DefaultColorDepth} = { val => $Depth }; $Screen->{Display} = [ map { { l => { Depth => { val => $_ }, $Mode_name => { val => join(' ', @Modes) } } }; } 8, 15, 16, 24 ]; -- cgit v1.2.1