summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-19 13:37:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-19 13:37:29 +0000
commit3b0359bc17830004fd75dc6b2a574cbe87bb8bc3 (patch)
tree0b288eb2cdedb7bee6eaef3a4f55b872db01696b
parent122873357bba0473773afadf6fbbb9342c2f91f4 (diff)
downloaddrakx-kbd-mouse-x11-3b0359bc17830004fd75dc6b2a574cbe87bb8bc3.tar
drakx-kbd-mouse-x11-3b0359bc17830004fd75dc6b2a574cbe87bb8bc3.tar.gz
drakx-kbd-mouse-x11-3b0359bc17830004fd75dc6b2a574cbe87bb8bc3.tar.bz2
drakx-kbd-mouse-x11-3b0359bc17830004fd75dc6b2a574cbe87bb8bc3.tar.xz
drakx-kbd-mouse-x11-3b0359bc17830004fd75dc6b2a574cbe87bb8bc3.zip
- XFdrake library:
o ensure set_default_background() doesn't fail (#39065) (ie default to 1024x768 if 0x0 is given)
-rw-r--r--NEWS4
-rw-r--r--lib/Xconfig/resolution_and_depth.pm5
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d85981e..22857c1 100644
--- a/NEWS
+++ b/NEWS
@@ -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";