summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-13 12:10:14 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-13 12:10:14 +0000
commit9efb0e8733d7d48bc2ee3054e85f0d4827db49a9 (patch)
tree26fa0d95a72d7d9aa52ca27eafc6e2bc6be880ce /perl-install/Xconfig.pm
parent3e7ac9af750f6c4968d38ea5e6717a4940db7dc2 (diff)
downloaddrakx-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.pm17
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;
}