summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig/xfree.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-30 13:04:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-30 13:04:59 +0000
commit3763b4031ed266dc2f236ee39e5011a79a1d7394 (patch)
tree6f627cc8693f9d30c90254508356cda908138c41 /lib/Xconfig/xfree.pm
parent6674b737ce907fd53d76bfc4f2c0f99e4cd20a13 (diff)
downloaddrakx-kbd-mouse-x11-3763b4031ed266dc2f236ee39e5011a79a1d7394.tar
drakx-kbd-mouse-x11-3763b4031ed266dc2f236ee39e5011a79a1d7394.tar.gz
drakx-kbd-mouse-x11-3763b4031ed266dc2f236ee39e5011a79a1d7394.tar.bz2
drakx-kbd-mouse-x11-3763b4031ed266dc2f236ee39e5011a79a1d7394.tar.xz
drakx-kbd-mouse-x11-3763b4031ed266dc2f236ee39e5011a79a1d7394.zip
- don't use 1280x1024 prefered resolution
(using prefered resolution only when adding explicit gtf modelines)
Diffstat (limited to 'lib/Xconfig/xfree.pm')
-rw-r--r--lib/Xconfig/xfree.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm
index 1e5eaaa..f1f5614 100644
--- a/lib/Xconfig/xfree.pm
+++ b/lib/Xconfig/xfree.pm
@@ -381,14 +381,20 @@ sub default_ModeLine() {
ModeLine_from_string(qq(Section "Monitor"\n) . (our $default_ModeLine) . qq(EndSection\n));
}
+sub xorg_builtin_resolution {
+ my ($X, $Y) = @_;
+ my $res = $X . 'x' . $Y;
+
+ $res eq '1280x1024' ||
+ $res ne '1400x1050' && $res ne '1152x864' && $Xconfig::xfree::resolution2ratio{$res} eq '4/3';
+}
+
sub add_gtf_ModeLines {
my ($raw_X, $resolutions) = @_;
my $banner = 'modeline generated by gtf(1) [handled by XFdrake]';
- my $res = $resolutions->[0]{X} . 'x' . $resolutions->[0]{Y};
my @to_add;
- if ($res ne '1280x1024' &&
- ($res eq '1400x1050' || $res eq '1152x864' || $Xconfig::xfree::resolution2ratio{$res} ne '4/3')) {
+ if (!xorg_builtin_resolution($resolutions->[0]{X}, $resolutions->[0]{Y})) {
@to_add = map {
my $resolution = $_;
map {