summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-09-13 14:16:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-09-13 14:16:55 +0000
commit230f1fc68eb6b0104f70617e0d4c1c332d532f12 (patch)
treea989fdf75867a8ef3fbeedb04eb88862d97bac77 /perl-install
parent90395d9b0d55741c8292c162c24741804514a877 (diff)
downloaddrakx-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')
-rw-r--r--perl-install/Xconfig/parse.pm2
-rw-r--r--perl-install/Xconfig/xfree.pm3
2 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/Xconfig/parse.pm b/perl-install/Xconfig/parse.pm
index 609534b54..71062a093 100644
--- a/perl-install/Xconfig/parse.pm
+++ b/perl-install/Xconfig/parse.pm
@@ -140,7 +140,7 @@ my %kind_names = (
Monitor => [ qw(Identifier VendorName ModelName HorizSync VertRefresh) ],
Device => [ qw(Identifier VendorName BoardName Chipset Driver VideoRam Screen BusID DPMS power_saver) ],
Display => [ qw(Depth Modes Virtual) ], # Subsection in Device
- Screen => [ qw(Identifier Driver Device Monitor DefaultColorDepth) ],
+ Screen => [ qw(Identifier Driver Device Monitor DefaultDepth DefaultColorDepth) ],
InputDevice => [ qw(Identifier Driver Protocol Device Type Mode XkbModel XkbLayout XkbDisable Emulate3Buttons Emulate3Timeout EmulateWheel EmulateWheelButton) ],
WacomCursor => [ qw(Port) ], #-\
WacomStylus => [ qw(Port) ], #--> Port must be first
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 } } };