summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/fb_base
diff options
context:
space:
mode:
authorJeremy Katz <jeremy.katz@nokia.com>2010-06-15 09:07:04 (GMT)
committerJeremy Katz <jeremy.katz@nokia.com>2010-06-15 09:07:04 (GMT)
commite5d607b3635d53c84dbb782f534d8cac9096dd14 (patch)
tree225b29c3f46f51de6ac32bd2798fee11c2f1562f /src/plugins/platforms/fb_base
parent0fdbda6da734969a8ea4e28a327071865b58fb5a (diff)
downloadQt-e5d607b3635d53c84dbb782f534d8cac9096dd14.zip
Qt-e5d607b3635d53c84dbb782f534d8cac9096dd14.tar.gz
Qt-e5d607b3635d53c84dbb782f534d8cac9096dd14.tar.bz2
fixed software cursor rendering when the widget under the cursor is redrawn
also check if the cursor exists before checking if it is dirty when considering an early exit from QFbScreen::doRedraw()
Diffstat (limited to 'src/plugins/platforms/fb_base')
-rw-r--r--src/plugins/platforms/fb_base/fb_base.cpp4
-rw-r--r--src/plugins/platforms/fb_base/fb_base.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/fb_base/fb_base.cpp b/src/plugins/platforms/fb_base/fb_base.cpp
index 0463a60..5004a5a 100644
--- a/src/plugins/platforms/fb_base/fb_base.cpp
+++ b/src/plugins/platforms/fb_base/fb_base.cpp
@@ -187,7 +187,7 @@ QRegion QFbScreen::doRedraw()
QRect lastCursor = cursor->dirtyRect();
repaintRegion += lastCursor;
}
- if (repaintRegion.isEmpty() && !cursor->isDirty()) {
+ if (repaintRegion.isEmpty() && (!cursor || !cursor->isDirty())) {
return touchedRegion;
}
@@ -239,7 +239,7 @@ QRegion QFbScreen::doRedraw()
}
QRect cursorRect;
- if (cursor && cursor->isDirty()) {
+ if (cursor && (cursor->isDirty() || repaintRegion.intersects(cursor->lastPainted()))) {
cursorRect = cursor->drawCursor(*compositePainter);
touchedRegion += cursorRect;
}
diff --git a/src/plugins/platforms/fb_base/fb_base.h b/src/plugins/platforms/fb_base/fb_base.h
index f1dd574..124dde0 100644
--- a/src/plugins/platforms/fb_base/fb_base.h
+++ b/src/plugins/platforms/fb_base/fb_base.h
@@ -32,6 +32,7 @@ public:
virtual void setDirty() { dirty = true; screen->setDirty(QRect()); }
virtual bool isDirty() { return dirty; }
virtual bool isOnScreen() { return onScreen; }
+ virtual QRect lastPainted() { return prevRect; }
protected:
QGraphicsSystemCursorImage * graphic;