summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2013-05-03 22:47:32 +0000
committerAnssi Hannula <anssi@mageia.org>2013-05-03 22:47:32 +0000
commit221d409f295746c5b3bab201159b40031bb45c2a (patch)
tree9d4ce7a46989a19e71bff50ee121ff3d1a070dae /lib
parent34639e57f95d7f21258d759007c7bde0027ba84e (diff)
downloaddrakx-kbd-mouse-x11-221d409f295746c5b3bab201159b40031bb45c2a.tar
drakx-kbd-mouse-x11-221d409f295746c5b3bab201159b40031bb45c2a.tar.gz
drakx-kbd-mouse-x11-221d409f295746c5b3bab201159b40031bb45c2a.tar.bz2
drakx-kbd-mouse-x11-221d409f295746c5b3bab201159b40031bb45c2a.tar.xz
drakx-kbd-mouse-x11-221d409f295746c5b3bab201159b40031bb45c2a.zip
Xconfig: never fallback to guessing display resolution
Neverfallback to guessing display resolution from display size or forcing it to 1024x768, instead fallback to automatic display mode (mga#9934).
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/resolution_and_depth.pm30
1 files changed, 1 insertions, 29 deletions
diff --git a/lib/Xconfig/resolution_and_depth.pm b/lib/Xconfig/resolution_and_depth.pm
index f443f3e..6b8ed66 100644
--- a/lib/Xconfig/resolution_and_depth.pm
+++ b/lib/Xconfig/resolution_and_depth.pm
@@ -41,31 +41,6 @@ sub from_bios {
sub bios_vga_modes() { @bios_vga_modes }
-sub size2default_resolution {
- my ($size) = @_; #- size in inch
-
- require detect_devices;
- if (arch() =~ /ppc/) {
- return "1024x768" if detect_devices::get_mac_model() =~ /^PowerBook|^iMac/;
- } elsif (detect_devices::is_xbox()) {
- return "640x480";
- }
-
- my %monitorSize2resolution = (
- 13 => "640x480",
- 14 => "800x600",
- 15 => "800x600",
- 16 => "1024x768",
- 17 => "1024x768",
- 18 => "1024x768",
- 19 => "1280x1024",
- 20 => "1280x1024",
- 21 => "1600x1200",
- 22 => "1600x1200",
- );
- $monitorSize2resolution{round($size)} || ($size < 13 ? "640x480" : "1600x1200");
-}
-
sub XxY { &Xconfig::xfree::XxY }
sub to_string {
@@ -168,11 +143,8 @@ sub choices {
put_in_hash($resolution_wanted, $monitors->[0]{preferred_resolution});
} elsif ($monitors->[0]{ModelName} =~ /^Flat Panel (\d+)x(\d+)$/) {
put_in_hash($resolution_wanted, { X => $1, Y => $2 });
- } elsif ($monitors->[0]{diagonal_size}) {
- my ($X, $Y) = split('x', size2default_resolution($monitors->[0]{diagonal_size} * 1.08));
- put_in_hash($resolution_wanted, { X => $X, Y => $Y });
} else {
- put_in_hash($resolution_wanted, { X => 1024, Y => 768 });
+ return { automatic => 1, Depth => $resolution_wanted->{Depth} }, @resolutions;
}
}
my @matching = grep { $_->{X} eq $resolution_wanted->{X} && $_->{Y} eq $resolution_wanted->{Y} } @resolutions;