diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-10-04 08:09:05 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-10-04 08:09:05 +0000 |
commit | 3a83f6a6bbc472e51c9c4da90f0c920cd96d0262 (patch) | |
tree | 8b196b211fb23f06254fb6167a6667ff67b996fa /lib/Xconfig/xfree.pm | |
parent | ce5313e1cf731590284093a9f6e87f58b846193b (diff) | |
download | drakx-kbd-mouse-x11-3a83f6a6bbc472e51c9c4da90f0c920cd96d0262.tar drakx-kbd-mouse-x11-3a83f6a6bbc472e51c9c4da90f0c920cd96d0262.tar.gz drakx-kbd-mouse-x11-3a83f6a6bbc472e51c9c4da90f0c920cd96d0262.tar.bz2 drakx-kbd-mouse-x11-3a83f6a6bbc472e51c9c4da90f0c920cd96d0262.tar.xz drakx-kbd-mouse-x11-3a83f6a6bbc472e51c9c4da90f0c920cd96d0262.zip |
- better fix for typo in 0.32: don't wrongly default to "automatic" resolution
when creating xorg.conf (in non --auto)
Diffstat (limited to 'lib/Xconfig/xfree.pm')
-rw-r--r-- | lib/Xconfig/xfree.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm index df53ea6..1b47902 100644 --- a/lib/Xconfig/xfree.pm +++ b/lib/Xconfig/xfree.pm @@ -188,14 +188,13 @@ sub get_resolutions { my $Screen = $o_Screen || $raw_X->get_default_screen or return {}; my $depth = val($Screen->{DefaultColorDepth} || $Screen->{DefaultDepth}); - my $Displays = $Screen->{Display} or return {}; - my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @$Displays or return { automatic => 1 }; + my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @{$Screen->{Display} || []} or return { automatic => 1 }; 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 ? @l : { automatic => 1 }; } sub set_resolutions { my ($raw_X, $resolutions, $o_Screen) = @_; |