diff options
author | Dexter Morgan <dmorgan@mageia.org> | 2011-06-02 20:51:14 +0000 |
---|---|---|
committer | Dexter Morgan <dmorgan@mageia.org> | 2011-06-02 20:51:14 +0000 |
commit | bf2d834f5a9074cb2281a0438eb3cf6fe614d44a (patch) | |
tree | a5d297c9605c2a84a5cd75671206cf36b7383d8a /lib/Xconfig/screen.pm | |
download | drakx-kbd-mouse-x11-distro/mga1.tar drakx-kbd-mouse-x11-distro/mga1.tar.gz drakx-kbd-mouse-x11-distro/mga1.tar.bz2 drakx-kbd-mouse-x11-distro/mga1.tar.xz drakx-kbd-mouse-x11-distro/mga1.zip |
Branch for updatesdistro/mga1
Diffstat (limited to 'lib/Xconfig/screen.pm')
-rw-r--r-- | lib/Xconfig/screen.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/Xconfig/screen.pm b/lib/Xconfig/screen.pm new file mode 100644 index 0000000..ad835fa --- /dev/null +++ b/lib/Xconfig/screen.pm @@ -0,0 +1,29 @@ +package Xconfig::screen; # $Id: screen.pm 210131 2004-11-18 13:25:45Z prigaux $ + +use diagnostics; +use strict; + +use common; + + +sub configure { + my ($raw_X) = @_; + + 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; + } + + my @sections = mapn { + my ($device, $monitor) = @_; + { Device => $device->{Identifier}, Monitor => $monitor->{Identifier} }; + } \@devices, \@monitors; + + $raw_X->set_screens(@sections); + 1; +} + +1; |