diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-09-08 10:59:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-09-08 10:59:04 +0000 |
commit | 6a23477ea83decfb386c660391b824c65e36d41d (patch) | |
tree | 8bc20101e84d174e4ee1c156b2c1d4b10b7cd7a5 /perl-install | |
parent | ef2794a410537611e730a7f697d7e3a8bf73d3da (diff) | |
download | drakx-6a23477ea83decfb386c660391b824c65e36d41d.tar drakx-6a23477ea83decfb386c660391b824c65e36d41d.tar.gz drakx-6a23477ea83decfb386c660391b824c65e36d41d.tar.bz2 drakx-6a23477ea83decfb386c660391b824c65e36d41d.tar.xz drakx-6a23477ea83decfb386c660391b824c65e36d41d.zip |
- when changing the card/monitor, ensure the resolution is still valid
- when switching to fbdev, ensure we have a bios resolution
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfig/main.pm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm index bf6d6d88a..3a4b27e0d 100644 --- a/perl-install/Xconfig/main.pm +++ b/perl-install/Xconfig/main.pm @@ -95,7 +95,11 @@ sub configure_chooser_raw { }; $update_texts->(); - my $may_set = sub { + my $may_set; + my $prompt_for_resolution = sub { + $may_set->('resolution', Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitors})); + }; + $may_set = sub { my ($field, $val) = @_; if ($val) { $X->{$field} = $val; @@ -104,8 +108,16 @@ sub configure_chooser_raw { $update_texts->(); if (member($field, 'card', 'monitors')) { - Xconfig::screen::configure($raw_X); - $raw_X->set_resolution($X->{resolution}) if $X->{resolution}; + my ($default_resolution) = Xconfig::resolution_and_depth::choices($raw_X, $X->{resolution}, $X->{card}, $X->{monitors}); + if (find { $default_resolution->{$_} ne $X->{resolution}{$_} } 'X', 'Y', 'Depth') { + $prompt_for_resolution->(); + } else { + if ($default_resolution->{bios} && !$X->{resolution}{bios}) { + $may_set->('resolution', $default_resolution); + } + Xconfig::screen::configure($raw_X); + $raw_X->set_resolution($X->{resolution}) if $X->{resolution}; + } } } }; @@ -121,9 +133,7 @@ sub configure_chooser_raw { $may_set->('monitors', Xconfig::monitor::configure($in, $raw_X, int($raw_X->get_devices))); } }, { label => N("Resolution"), val => \$texts{resolution}, disabled => sub { !$X->{card} || !$X->{monitors} }, - clicked => sub { - $may_set->('resolution', Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitors})); - } }, + clicked => $prompt_for_resolution }, if_(Xconfig::card::check_bad_card($X->{card}) || $::isStandalone, { val => N("Test"), disabled => sub { !$X->{card} || !$X->{monitors} }, clicked => sub { |