diff --git a/applet.cpp b/applet.cpp index f210c1a75..63589502c 100644 --- a/applet.cpp +++ b/applet.cpp @@ -826,9 +826,9 @@ void Applet::setBackgroundHints(const BackgroundHints hints) //position is in the boundaries overlaySize.width()*2, overlaySize.height() qsrand(id()); - d->background->d->overlayPos.rx() = - (overlaySize.width() /4) + (overlaySize.width() /4) * (qrand() % (4 + 1)); + d->background->d->overlayPos.rx() = - (overlaySize.width() /2) + (overlaySize.width() /4) * (qrand() % (4 + 1)); - d->background->d->overlayPos.ry() = (- (overlaySize.height() /4) + (overlaySize.height() /4) * (qrand() % (4 + 1)))/2; + d->background->d->overlayPos.ry() = (- (overlaySize.height() /2) + (overlaySize.height() /4) * (qrand() % (4 + 1)))/2; } } else if (d->background) {