diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-12-08 09:59:02 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-12-08 09:59:02 +0000 |
commit | 065a9d8b6082a756e4b3697ffe99d3eb13f149b8 (patch) | |
tree | 4e6050eddd18be9e6bf1b7ea7774868d2c1b67ca /lib/Xconfig/xfree.pm | |
parent | 85747bfdd9418740058545902e2bd5fda5f81ea7 (diff) | |
download | drakx-kbd-mouse-x11-065a9d8b6082a756e4b3697ffe99d3eb13f149b8.tar drakx-kbd-mouse-x11-065a9d8b6082a756e4b3697ffe99d3eb13f149b8.tar.gz drakx-kbd-mouse-x11-065a9d8b6082a756e4b3697ffe99d3eb13f149b8.tar.bz2 drakx-kbd-mouse-x11-065a9d8b6082a756e4b3697ffe99d3eb13f149b8.tar.xz drakx-kbd-mouse-x11-065a9d8b6082a756e4b3697ffe99d3eb13f149b8.zip |
- XFdrake
o there is no reason "automatic" resolution should imply "automatic" color
depth
Diffstat (limited to 'lib/Xconfig/xfree.pm')
-rw-r--r-- | lib/Xconfig/xfree.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm index cc4d6c8..f79a788 100644 --- a/lib/Xconfig/xfree.pm +++ b/lib/Xconfig/xfree.pm @@ -180,13 +180,13 @@ sub get_resolutions { my $Screen = $o_Screen || $raw_X->get_default_screen or return {}; my $depth = val($Screen->{DefaultColorDepth} || $Screen->{DefaultDepth}); - my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @{$Screen->{Display} || []} or return { automatic => 1 }; + my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @{$Screen->{Display} || []} or return { automatic => 1, Depth => $depth }; my $s = val($Display->{l}{Virtual} || $Display->{l}{Modes}); my @l; while ($s =~ /(\d+)(x|\s+)(\d+)/g) { push @l, { X => $1, Y => $3, Depth => val($Display->{l}{Depth}) }; } - @l ? @l : { automatic => 1 }; + @l ? @l : { automatic => 1, Depth => $depth }; } sub set_resolutions { my ($raw_X, $resolutions, $o_Screen) = @_; @@ -206,14 +206,17 @@ sub set_resolutions { my @l = $Mode_name eq 'Modes' ? @$resolutions : first(@$resolutions); my @Modes = map { sprintf($Mode_name eq 'Modes' ? '"%dx%d"' : '%d %d', @$_{'X', 'Y'}) } @l; - $Screen->{DefaultColorDepth} = { val => $Depth }; $Screen->{Display} = [ map { { l => { Depth => { val => $_ }, $Mode_name => { val => join(' ', @Modes) } } }; } 8, 15, 16, 24 ]; } else { - delete $Screen->{DefaultColorDepth}; delete $Screen->{Display}; } + if ($Depth) { + $Screen->{DefaultColorDepth} = { val => $Depth }; + } else { + delete $Screen->{DefaultColorDepth}; + } } add_gtf_ModeLines($raw_X, $resolutions) if $resolutions->[0]{X}; |