From 6fd2ee8f8cc2a428d82a9b03826052f6fcaf0d68 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 17 Aug 2002 13:14:31 +0000 Subject: ensure the chosen resolution is maintained unchanged when changing the graphic card or monitor. --- perl-install/Xconfig/main.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm index 9f9d6e7cc..e247b001f 100644 --- a/perl-install/Xconfig/main.pm +++ b/perl-install/Xconfig/main.pm @@ -90,6 +90,11 @@ sub configure_chooser_raw { $X->{"modified_$field"} = 1; $modified = 1; $update_texts->(); + + if (member($field, 'card', 'monitor')) { + Xconfig::screen::configure($raw_X, $X->{card}); + $raw_X->set_resolution($X->{resolution}) if $X->{resolution}; + } } }; @@ -102,11 +107,8 @@ sub configure_chooser_raw { { label => _("Monitor"), val => \$texts{monitor}, icon => "ic82-systemeplus-40", clicked => sub { $may_set->('monitor', Xconfig::monitor::configure($in, $raw_X)); } }, - { label => _("Resolution"), val => \$texts{resolution}, icon => "X", disabled => sub { !$X->{card} || !$X->{monitor} }, + { label => _("Resolution"), val => \$texts{resolution}, icon => "X", disabled => sub { !$X->{card} || !$X->{monitor} }, clicked => sub { - if (grep { delete $X->{"modified_$_"} } 'card', 'monitor') { - Xconfig::screen::configure($raw_X, $X->{card}); - } $may_set->('resolution', Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitor})); } }, { val => _("Test"), icon => "warning", disabled => sub { !$X->{card} || !$X->{monitor} || !$modified || !Xconfig::card::check_bad_card($X->{card}) }, -- cgit v1.2.1