diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | lib/Xconfig/resolution_and_depth.pm | 5 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,7 @@ +- XFdrake library: + o ensure set_default_background() doesn't fail (#39065) + (ie default to 1024x768 if 0x0 is given) + Version 0.51 - 19 March 2008 - XFdrake: diff --git a/lib/Xconfig/resolution_and_depth.pm b/lib/Xconfig/resolution_and_depth.pm index d35deca..0c87503 100644 --- a/lib/Xconfig/resolution_and_depth.pm +++ b/lib/Xconfig/resolution_and_depth.pm @@ -250,6 +250,11 @@ sub set_resolution { } sub set_default_background { my ($resolution) = @_; + + $resolution->{X} && $resolution->{Y} or do { + $resolution = { X => 1024, Y => 768 }; + log::l("defaulting background resolution to $resolution->{X}x$resolution->{Y}"); + }; my $ratio = $resolution->{X} / $resolution->{Y}; my $dir = "$::prefix/usr/share/mdk/backgrounds"; |