summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-28 14:33:48 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-28 14:33:48 +0000
commit4bf70375459a272ee50c0f0fd19112f7ba0de04d (patch)
tree10edf3e419938bdc7c78b62b42d79286f71e8ddd /perl-install/Xconfig
parentd4178937242d469346dd36a879004c5a230fd454 (diff)
downloaddrakx-4bf70375459a272ee50c0f0fd19112f7ba0de04d.tar
drakx-4bf70375459a272ee50c0f0fd19112f7ba0de04d.tar.gz
drakx-4bf70375459a272ee50c0f0fd19112f7ba0de04d.tar.bz2
drakx-4bf70375459a272ee50c0f0fd19112f7ba0de04d.tar.xz
drakx-4bf70375459a272ee50c0f0fd19112f7ba0de04d.zip
Xconfig::xfree3::set_resolution and Xconfig::xfree4::set_resolution must not modify parameter $Screen before calling Xconfig::xfreeX::set_resolution (otherwise the resolution setting is done on only one device which is bad for multi-head)
Diffstat (limited to 'perl-install/Xconfig')
-rw-r--r--perl-install/Xconfig/xfree3.pm9
-rw-r--r--perl-install/Xconfig/xfree4.pm12
2 files changed, 10 insertions, 11 deletions
diff --git a/perl-install/Xconfig/xfree3.pm b/perl-install/Xconfig/xfree3.pm
index 9235f8f96..9b69b3cb6 100644
--- a/perl-install/Xconfig/xfree3.pm
+++ b/perl-install/Xconfig/xfree3.pm
@@ -86,13 +86,12 @@ sub set_wacoms {
sub depths { 8, 15, 16, 24, 32 }
sub set_resolution {
my ($raw_X, $resolution, $Screen) = @_;
- $Screen ||= $raw_X->get_default_screen or return {};
$resolution = +{ %$resolution };
-
- #- use framebuffer if Screen is
- $resolution->{fbdev} = 1 if val($Screen->{Driver}) eq 'fbdev';
-
+ if (my $Screen_ = $Screen || $raw_X->get_default_screen) {
+ #- use framebuffer if Screen is
+ $resolution->{fbdev} = 1 if val($Screen_->{Driver}) eq 'fbdev';
+ }
$raw_X->SUPER::set_resolution($resolution, $Screen);
}
diff --git a/perl-install/Xconfig/xfree4.pm b/perl-install/Xconfig/xfree4.pm
index 3045bd697..542226000 100644
--- a/perl-install/Xconfig/xfree4.pm
+++ b/perl-install/Xconfig/xfree4.pm
@@ -85,16 +85,16 @@ sub set_wacoms {
sub depths { 8, 15, 16, 24 }
sub set_resolution {
my ($raw_X, $resolution, $Screen) = @_;
- $Screen ||= $raw_X->get_default_screen or return {};
$resolution = +{ %$resolution };
-
- #- use framebuffer if corresponding Device has Driver framebuffer
- my $Device = $raw_X->get_Section_by_Identifier('Device', val($Screen->{Device})) or internal_error("no device named $Screen->{Device}");
- $resolution->{fbdev} = 1 if val($Device->{Driver}) eq 'fbdev';
-
+ if (my $Screen_ = $Screen || $raw_X->get_default_screen) {
+ #- use framebuffer if corresponding Device has Driver framebuffer
+ my $Device = $raw_X->get_Section_by_Identifier('Device', val($Screen_->{Device})) or internal_error("no device named $Screen_->{Device}");
+ $resolution->{fbdev} = 1 if val($Device->{Driver}) eq 'fbdev';
+ }
#- XFree4 doesn't like depth 32, silently replacing it with 24
$resolution->{Depth} = 24 if $resolution->{Depth} eq '32';
+
$raw_X->SUPER::set_resolution($resolution, $Screen);
}