summaryrefslogtreecommitdiffstats
path: root/lib/Xconfig
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 /lib/Xconfig
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)
Diffstat (limited to 'lib/Xconfig')
-rw-r--r--lib/Xconfig/resolution_and_depth.pm5
1 files changed, 5 insertions, 0 deletions
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";