Mageia Bugzilla – Attachment 461 Details for
Bug 1295
The code creating default.jpg needs to be improved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Ugly fix for detect resolution
libDrakX-detect_resolution_from_monitor_edid.patch (text/plain), 684 bytes, created by
Kobi
on 2011-05-24 18:07:01 CEST
(
hide
)
Description:
Ugly fix for detect resolution
Filename:
MIME Type:
Creator:
Kobi
Created:
2011-05-24 18:07:01 CEST
Size:
684 bytes
patch
obsolete
>--- resolution_and_depth.pm.old 2011-05-24 17:56:37.769004633 +0200 >+++ resolution_and_depth.pm 2011-05-24 17:56:03.732001374 +0200 >@@ -279,9 +279,12 @@ > } > sub set_default_background { > my ($resolution) = @_; >- > $resolution->{X} && $resolution->{Y} or do { >- $resolution = { X => 1024, Y => 768 }; >+ my $monitor_edid = run_program::rooted_get_stdout($::prefix, 'monitor-edid|grep ModeLine'); >+ ($resolution->{X}, $resolution->{Y}) = $monitor_edid =~ /.+ModeLine\s\"(\d+)x(\d+)\".+/; >+ if(!$resolution->{X} && !$resolution->{Y}){ >+ $resolution = { X => 1024, Y => 768 }; >+ } > log::l("defaulting background resolution to $resolution->{X}x$resolution->{Y}"); > }; >
--- resolution_and_depth.pm.old 2011-05-24 17:56:37.769004633 +0200 +++ resolution_and_depth.pm 2011-05-24 17:56:03.732001374 +0200 @@ -279,9 +279,12 @@ } sub set_default_background { my ($resolution) = @_; - $resolution->{X} && $resolution->{Y} or do { - $resolution = { X => 1024, Y => 768 }; + my $monitor_edid = run_program::rooted_get_stdout($::prefix, 'monitor-edid|grep ModeLine'); + ($resolution->{X}, $resolution->{Y}) = $monitor_edid =~ /.+ModeLine\s\"(\d+)x(\d+)\".+/; + if(!$resolution->{X} && !$resolution->{Y}){ + $resolution = { X => 1024, Y => 768 }; + } log::l("defaulting background resolution to $resolution->{X}x$resolution->{Y}"); };
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1295
: 461