summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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";