diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-28 22:02:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-28 22:02:39 +0000 |
commit | ee295df5670f73b285e3de0cea0fdae7d92941bd (patch) | |
tree | 1dbff785561e08dd894473b3c3b223fb1b68e081 /perl-install/Xconfig/screen.pm | |
parent | 70fd8ae05409bb33818da725015daf181c6e6a83 (diff) | |
download | drakx-backup-do-not-use-ee295df5670f73b285e3de0cea0fdae7d92941bd.tar drakx-backup-do-not-use-ee295df5670f73b285e3de0cea0fdae7d92941bd.tar.gz drakx-backup-do-not-use-ee295df5670f73b285e3de0cea0fdae7d92941bd.tar.bz2 drakx-backup-do-not-use-ee295df5670f73b285e3de0cea0fdae7d92941bd.tar.xz drakx-backup-do-not-use-ee295df5670f73b285e3de0cea0fdae7d92941bd.zip |
14 new modules, will it be enough?? :)
Diffstat (limited to 'perl-install/Xconfig/screen.pm')
-rw-r--r-- | perl-install/Xconfig/screen.pm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/perl-install/Xconfig/screen.pm b/perl-install/Xconfig/screen.pm new file mode 100644 index 000000000..761c5defd --- /dev/null +++ b/perl-install/Xconfig/screen.pm @@ -0,0 +1,42 @@ +package Xconfig::screen; # $Id$ + +use diagnostics; +use strict; + +use common; + + +sub configure { + my ($raw_X, $card) = @_; + + my @devices = $raw_X->get_devices; + my @monitors = $raw_X->get_monitors; + + if (@monitors < @devices) { + $raw_X->set_monitors(@monitors, ({}) x (@devices - @monitors)); + @monitors = $raw_X->get_monitors; + } + + if ($card->{server}) { + $raw_X->{xfree3}->set_screens({ Device => $devices[0]{Identifier}, Monitor => $monitors[0]{Identifier}, + Driver => $Xconfig::card::serversdriver{$card->{server}} || internal_error("bad XFree3 server $card->{server}"), + }); + } else { + @{$raw_X->{xfree3}} = (); + } + + if ($card->{Driver}) { + my @sections = mapn { + my ($device, $monitor) = @_; + { Device => $device->{Identifier}, Monitor => $monitor->{Identifier} } + } \@devices, \@monitors; + + $raw_X->{xfree4}->set_screens(@sections); + } else { + @{$raw_X->{xfree4}} = (); + } + + 1; +} + +1; |