summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 } } };