summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-11-21 17:05:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-11-21 17:05:30 +0000
commit2af32618df0bfc5f8802fe50ddd35cd06a59e128 (patch)
treea8e71c2c0c18e31712614870a7fe002a18e3615f
parent4cd02a401aab9086dcb451b11b842ce666e358d9 (diff)
downloaddrakx-kbd-mouse-x11-2af32618df0bfc5f8802fe50ddd35cd06a59e128.tar
drakx-kbd-mouse-x11-2af32618df0bfc5f8802fe50ddd35cd06a59e128.tar.gz
drakx-kbd-mouse-x11-2af32618df0bfc5f8802fe50ddd35cd06a59e128.tar.bz2
drakx-kbd-mouse-x11-2af32618df0bfc5f8802fe50ddd35cd06a59e128.tar.xz
drakx-kbd-mouse-x11-2af32618df0bfc5f8802fe50ddd35cd06a59e128.zip
fix 2 previous commits:
- $raw_X->get_Driver can't be used in auto_installs since monitor is configured first - $raw_X is now needed in choose()
-rw-r--r--lib/Xconfig/monitor.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm
index c52e843..0c49360 100644
--- a/lib/Xconfig/monitor.pm
+++ b/lib/Xconfig/monitor.pm
@@ -41,7 +41,7 @@ sub configure {
}
my $head_nb = 1;
foreach my $monitor (@$monitors) {
- choose($in, $monitor, @$monitors > 1 ? $head_nb++ : 0, $b_auto) or return;
+ choose($in, $raw_X, $monitor, @$monitors > 1 ? $head_nb++ : 0, $b_auto) or return;
}
$raw_X->set_monitors(@$monitors);
$monitors;
@@ -66,8 +66,10 @@ sub configure_auto_install {
configure_automatic($monitor);
} $monitors, $old_X->{monitors} if $old_X->{monitors};
+ my $card_Driver;
if (!is_valid($monitors->[0])) {
- put_in_hash($monitors->[0], probe($raw_X->get_Driver));
+ $card_Driver ||= first(Xconfig::card::probe())->{Driver};
+ put_in_hash($monitors->[0], probe($card_Driver));
}
foreach my $monitor (@$monitors) {
@@ -82,7 +84,7 @@ sub configure_auto_install {
}
sub choose {
- my ($in, $monitor, $head_nb, $b_auto) = @_;
+ my ($in, $raw_X, $monitor, $head_nb, $b_auto) = @_;
my $ok = is_valid($monitor);
if ($b_auto && $ok) {