diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-13 12:10:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-13 12:10:14 +0000 |
commit | 9efb0e8733d7d48bc2ee3054e85f0d4827db49a9 (patch) | |
tree | 26fa0d95a72d7d9aa52ca27eafc6e2bc6be880ce /perl-install/Xconfig.pm | |
parent | 3e7ac9af750f6c4968d38ea5e6717a4940db7dc2 (diff) | |
download | drakx-backup-do-not-use-9efb0e8733d7d48bc2ee3054e85f0d4827db49a9.tar drakx-backup-do-not-use-9efb0e8733d7d48bc2ee3054e85f0d4827db49a9.tar.gz drakx-backup-do-not-use-9efb0e8733d7d48bc2ee3054e85f0d4827db49a9.tar.bz2 drakx-backup-do-not-use-9efb0e8733d7d48bc2ee3054e85f0d4827db49a9.tar.xz drakx-backup-do-not-use-9efb0e8733d7d48bc2ee3054e85f0d4827db49a9.zip |
no_comment
Diffstat (limited to 'perl-install/Xconfig.pm')
-rw-r--r-- | perl-install/Xconfig.pm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm index 2e93b5679..e22168377 100644 --- a/perl-install/Xconfig.pm +++ b/perl-install/Xconfig.pm @@ -18,7 +18,8 @@ sub keymap_translate { sub getinfo { my $o = {}; - getinfoFromXF86Config($o); +# getinfoFromXF86Config($o); + getinfoFromDDC($o); getinfoFromSysconfig($o); $o->{mouse}{emulate3buttons} = 1; @@ -87,4 +88,18 @@ sub getinfoFromSysconfig { $keyboard{KEYTABLE} or last; $o->{keyboard}{xkb_keymap} ||= keymap_translate($keyboard{KEYTABLE}); } + $o; +} + +sub getinfoFromDDC { + my $o = shift || {}; + my $O = $o->{monitor} ||= {}; + return $o if $O->{hsyncrange} && $O->{vsyncrange} && $O->{modelines}; + my ($h, $v, @l) = `ddcxinfo`; + $? == 0 or return $o; + chop $h; chop $v; + $O->{hsyncrange} ||= $h; + $O->{vsyncrange} ||= $v; + $O->{modelines} ||= join '', @l; + $o; } |