summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/xfree.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-14 07:48:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-14 07:48:18 +0000
commit954099b536c62c15a8472444ef2863e25d0d2285 (patch)
treeedbe5f9f0ea449bced6b7d2e136090fea23f483c /lib/Xconfig/xfree.pm
parentd7eef6c938247bee2a2d6803e01d40e2150e7359 (diff)
downloaddrakx-kbd-mouse-x11-954099b536c62c15a8472444ef2863e25d0d2285.tar
drakx-kbd-mouse-x11-954099b536c62c15a8472444ef2863e25d0d2285.tar.gz
drakx-kbd-mouse-x11-954099b536c62c15a8472444ef2863e25d0d2285.tar.bz2
drakx-kbd-mouse-x11-954099b536c62c15a8472444ef2863e25d0d2285.tar.xz
drakx-kbd-mouse-x11-954099b536c62c15a8472444ef2863e25d0d2285.zip
prepare next commit
Diffstat (limited to 'lib/Xconfig/xfree.pm')
-rw-r--r--lib/Xconfig/xfree.pm4
1 files changed, 3 insertions, 1 deletions
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 ];