diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-13 14:16:55 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-13 14:16:55 +0000 |
commit | 230f1fc68eb6b0104f70617e0d4c1c332d532f12 (patch) | |
tree | a989fdf75867a8ef3fbeedb04eb88862d97bac77 /perl-install/Xconfig/xfree.pm | |
parent | 90395d9b0d55741c8292c162c24741804514a877 (diff) | |
download | drakx-230f1fc68eb6b0104f70617e0d4c1c332d532f12.tar drakx-230f1fc68eb6b0104f70617e0d4c1c332d532f12.tar.gz drakx-230f1fc68eb6b0104f70617e0d4c1c332d532f12.tar.bz2 drakx-230f1fc68eb6b0104f70617e0d4c1c332d532f12.tar.xz drakx-230f1fc68eb6b0104f70617e0d4c1c332d532f12.zip |
handle DefaultDepth (which is the same as DefaultColorDepth)
Diffstat (limited to 'perl-install/Xconfig/xfree.pm')
-rw-r--r-- | perl-install/Xconfig/xfree.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/Xconfig/xfree.pm b/perl-install/Xconfig/xfree.pm index d783d4de3..8c3b7857c 100644 --- a/perl-install/Xconfig/xfree.pm +++ b/perl-install/Xconfig/xfree.pm @@ -141,7 +141,7 @@ sub get_resolution { my ($raw_X, $o_Screen) = @_; my $Screen = $o_Screen || $raw_X->get_default_screen or return {}; - my $depth = val($Screen->{DefaultColorDepth}); + my $depth = val($Screen->{DefaultColorDepth} || $Screen->{DefaultDepth}); my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @{$Screen->{Display} || []} or return {}; $Display->{l}{Virtual} && val($Display->{l}{Virtual}) =~ /(\d+)\s+(\d+)/ or val($Display->{l}{Modes}) =~ /(\d+)x(\d+)/ or return {}; @@ -156,6 +156,7 @@ sub set_resolution { my $Mode_name = (any { $_->{l}{Modes} } @{$Screen->{Display} || []}) ? 'Modes' : 'Virtual'; my $Mode = sprintf($Mode_name eq 'Modes' ? '"%dx%d"' : '%d %d', @$resolution{'X', 'Y'}); + delete $Screen->{DefaultDepth}; $Screen->{DefaultColorDepth} = { val => $resolution->{Depth} eq '32' ? 24 : $resolution->{Depth} }; $Screen->{Display} = [ map { { l => { Depth => { val => $_ }, $Mode_name => { val => $Mode } } }; |