summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/main.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-22 16:27:33 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-22 16:27:33 +0000
commitacddb352ae4cf5d0d93449843f29ebd61f530809 (patch)
tree246cbd9da50d95b8727a3f0f328543c49c01a1f1 /perl-install/Xconfig/main.pm
parentbb895bbaadb5b4e5132bfb28b5f4ee68eae812cd (diff)
downloaddrakx-acddb352ae4cf5d0d93449843f29ebd61f530809.tar
drakx-acddb352ae4cf5d0d93449843f29ebd61f530809.tar.gz
drakx-acddb352ae4cf5d0d93449843f29ebd61f530809.tar.bz2
drakx-acddb352ae4cf5d0d93449843f29ebd61f530809.tar.xz
drakx-acddb352ae4cf5d0d93449843f29ebd61f530809.zip
try a little harder to know if we must write the config file.
this is still not enough though
Diffstat (limited to 'perl-install/Xconfig/main.pm')
-rw-r--r--perl-install/Xconfig/main.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm
index 3b1189e79..724dc111f 100644
--- a/perl-install/Xconfig/main.pm
+++ b/perl-install/Xconfig/main.pm
@@ -16,8 +16,7 @@ use any;
sub configure_monitor {
my ($in) = @_;
- my $raw_X = Xconfig::xfree->read;
- my $before = $raw_X->prepare_write;
+ my ($raw_X, $before) = Xconfig::xfree->read_and_prepare_write;
Xconfig::monitor::configure($in, $raw_X, int($raw_X->get_devices)) or return;
if ($raw_X->prepare_write ne $before) {
$raw_X->write;
@@ -30,12 +29,11 @@ sub configure_monitor {
sub configure_resolution {
my ($in) = @_;
- my $raw_X = Xconfig::xfree->read;
+ my ($raw_X, $before) = Xconfig::xfree->read_and_prepare_write;
my $X = {
card => Xconfig::card::from_raw_X($raw_X),
monitors => [ $raw_X->get_monitors ],
};
- my $before = $raw_X->prepare_write;
$X->{resolution} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitors}) or return;
if ($raw_X->prepare_write ne $before) {
&write($raw_X, $X);