summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorChris Colbert <sccolbert@gmail.com>2013-11-18 21:49:21 -0500
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-25 07:52:44 +0100
commitab76593f18396e693f24066592244ca95e135ea2 (patch)
treec4f040413fbf3a62830903741d85f25820b7e4f1 /src/widgets
parent7b6253efbf28b43c8b2a561c188670466ac3d916 (diff)
Fix the ignored Qt::WA_StaticContents on Windows
This restores the ability from the Qt 4.x series to honor the static contents region in the backbuffer when resizing a widget. The fix only applies when running under Windows. Task-number: QTBUG-34799 [ChangeLog][QtWidgets][Windows] Update QWidgetBackingStore and QWindowsBackingStore to support Qt::WA_StaticContents QWidgetBackingStore::staticContents() was updated for windows to *not* unconditionally return false. It now returns true if it has a non-empty static widgets list. QWindowsBackingStore::resize(...) was updated to honor the provided static contents region. It now copies the static region into the new backbuffer in a manner similar to what was done in Qt4. The difference is that this version accounts for the possibility of the new buffer having a smaller region than the old buffer. In Qt4 the ::prepareBuffer method was only called when the buffer was resized larger. Change-Id: I135ff8fb16f52759089f1e7353426303c4504db3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index 39583c8caa..b6c3e13cb0 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -240,7 +240,13 @@ private:
}
inline bool hasStaticContents() const
- { return !staticWidgets.isEmpty() && false; }
+ {
+#if defined(Q_OS_WIN)
+ return !staticWidgets.isEmpty();
+#else
+ return !staticWidgets.isEmpty() && false;
+#endif
+ }
friend QRegion qt_dirtyRegion(QWidget *);
friend class QWidgetPrivate;