aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-10-17 10:31:51 -0400
committerKen Moore <ken@ixsystems.com>2016-10-17 10:31:51 -0400
commitc816fad1b4462b979d7b60c4e510fab3896a6bf1 (patch)
tree29cbcbd76fb3c5563db6a01929248423534eab99 /src-qt5/core/lumina-desktop/LDesktopBackground.cpp
parentOops - forgot to save the fallback CPU temperature reading into the variable. (diff)
downloadlumina-c816fad1b4462b979d7b60c4e510fab3896a6bf1.tar.gz
lumina-c816fad1b4462b979d7b60c4e510fab3896a6bf1.tar.bz2
lumina-c816fad1b4462b979d7b60c4e510fab3896a6bf1.zip
Fix the painting routines for the desktop/panel. Make sure we only paint the *requested* rectangle, and not the whole thing on every request.
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktopBackground.cpp')
-rw-r--r--src-qt5/core/lumina-desktop/LDesktopBackground.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
index 3d33db71..97249384 100644
--- a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
@@ -7,12 +7,13 @@
#include "LDesktopBackground.h"
#include <QPainter>
+#include <QPaintEvent>
-void LDesktopBackground::paintEvent(QPaintEvent *) {
+void LDesktopBackground::paintEvent(QPaintEvent *ev) {
if (bgPixmap != NULL) {
QPainter painter(this);
painter.setBrush(*bgPixmap);
- painter.drawRect(0, 0, width(), height());
+ painter.drawRect(ev->rect());
}
}
bgstack15