summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-05 07:03:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-05 07:03:00 +0000
commit2a6f73606409831867e61958e205ef23dbcd9a1d (patch)
treed631a9b507048e90b0ed4d9801cd1fb7ef9fb1e1
parent862d55e8dc55b3c48d61f7cd5b0ee2c1d0e30081 (diff)
downloaddrakx-kbd-mouse-x11-2a6f73606409831867e61958e205ef23dbcd9a1d.tar
drakx-kbd-mouse-x11-2a6f73606409831867e61958e205ef23dbcd9a1d.tar.gz
drakx-kbd-mouse-x11-2a6f73606409831867e61958e205ef23dbcd9a1d.tar.bz2
drakx-kbd-mouse-x11-2a6f73606409831867e61958e205ef23dbcd9a1d.tar.xz
drakx-kbd-mouse-x11-2a6f73606409831867e61958e205ef23dbcd9a1d.zip
- don't use 1280x1024 prefered resolution (#30069)
(using prefered resolution only when adding explicit gtf modelines) (backport from trunk)
-rw-r--r--NEWS3
-rw-r--r--lib/Xconfig/monitor.pm4
-rw-r--r--lib/Xconfig/xfree.pm12
3 files changed, 13 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 5270a64..44892af 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- don't use 1280x1024 prefered resolution (#30069)
+ (using prefered resolution only when adding explicit gtf modelines)
+
Version 0.15 - 3 April 2007, by Pascal "Pixel" Rigaux
- drakkeyboard & rescue: fix loadkeys_files() for x86_64
diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm
index 79b32f7..958af12 100644
--- a/lib/Xconfig/monitor.pm
+++ b/lib/Xconfig/monitor.pm
@@ -215,9 +215,7 @@ sub probe_DDC() {
$monitor->{ModeLine} = Xconfig::xfree::default_ModeLine();
my $detailed_timings = $monitor->{detailed_timings} || [];
foreach (grep { !$_->{bad_ratio} } @$detailed_timings) {
- my $ratio = $_->{horizontal_active} / $_->{vertical_active};
-
- if (abs($ratio - 4 / 3) < 0.01) {
+ if (Xconfig::xfree::xorg_builtin_resolution($_->{horizontal_active}, $_->{vertical_active})) {
#- we don't want the 4/3 modelines otherwise they conflict with the Xorg builtin vesamodes
} else {
unshift @{$monitor->{ModeLine}},
diff --git a/lib/Xconfig/xfree.pm b/lib/Xconfig/xfree.pm
index e40e328..9113976 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 {