summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--lib/Xconfig/main.pm2
-rw-r--r--lib/Xconfig/resolution_and_depth.pm4
-rw-r--r--lib/Xconfig/xfree.pm5
4 files changed, 8 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 371bbef..4878d69 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- better fix for typo in 0.32: don't wrongly default to "automatic" resolution
+ when creating xorg.conf (in non --auto)
+
Version 0.35 - 3 October 2007, by Thierry Vignaud
- updated translation
diff --git a/lib/Xconfig/main.pm b/lib/Xconfig/main.pm
index 9a9c5e1..b8601c0 100644
--- a/lib/Xconfig/main.pm
+++ b/lib/Xconfig/main.pm
@@ -69,7 +69,7 @@ sub configure_everything {
$ok &&= $X->{card} = Xconfig::card::configure($in, $raw_X, $do_pkgs, $auto, $options);
$ok &&= $X->{monitors} = Xconfig::monitor::configure($in, $raw_X, int($raw_X->get_devices), $probed_info, $auto);
$ok &&= Xconfig::screen::configure($raw_X);
- $ok &&= $X->{resolutions} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitors}, $auto);
+ $ok &&= $X->{resolutions} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitors}, $auto, {});
$ok &&= Xconfig::test::test($in, $raw_X, $X->{card}, '', 'skip_badcard') if !$auto;
if (!$ok) {
diff --git a/lib/Xconfig/resolution_and_depth.pm b/lib/Xconfig/resolution_and_depth.pm
index 0d7715e..2847e6b 100644
--- a/lib/Xconfig/resolution_and_depth.pm
+++ b/lib/Xconfig/resolution_and_depth.pm
@@ -195,9 +195,9 @@ sub choices {
}
sub configure {
- my ($in, $raw_X, $card, $monitors, $b_auto) = @_;
+ my ($in, $raw_X, $card, $monitors, $b_auto, $o_resolution) = @_;
- my ($default_resolution, @resolutions) = choices($raw_X, $raw_X->get_resolution, $card, $monitors);
+ my ($default_resolution, @resolutions) = choices($raw_X, $o_resolution || $raw_X->get_resolution, $card, $monitors);
if ($b_auto) {
#- use $default_resolution
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) = @_;