summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-06-26 10:56:31 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-08-21 08:36:18 (GMT)
commiteffb3815f935e2e8a4699630d258d531efdc6029 (patch)
tree4c7fcc9cf6acbfc6abdada6d4f054672d971c5e9
parentcb292a2dac71aeed0a8438f7ce6c6dc61d8f8f83 (diff)
downloadQt-effb3815f935e2e8a4699630d258d531efdc6029.zip
Qt-effb3815f935e2e8a4699630d258d531efdc6029.tar.gz
Qt-effb3815f935e2e8a4699630d258d531efdc6029.tar.bz2
Avoid painting window decorations flicker show
Request focus before requesting a geometry. This makes it much more likely that the initial paint will be done after the window is active. Task-number: 255828 Reviewed-by: Tom
-rw-r--r--src/gui/kernel/qwidget_qws.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/kernel/qwidget_qws.cpp b/src/gui/kernel/qwidget_qws.cpp
index ea3cef2..9fad9bf 100644
--- a/src/gui/kernel/qwidget_qws.cpp
+++ b/src/gui/kernel/qwidget_qws.cpp
@@ -576,6 +576,15 @@ void QWidgetPrivate::show_sys()
if (q->isWindow()) {
+
+ if (!q->testAttribute(Qt::WA_ShowWithoutActivating)
+ && q->windowType() != Qt::Popup
+ && q->windowType() != Qt::Tool
+ && q->windowType() != Qt::ToolTip) {
+ QWidget::qwsDisplay()->requestFocus(data.winid,true);
+ }
+
+
if (QWindowSurface *surface = q->windowSurface()) {
const QRect frameRect = q->frameGeometry();
if (surface->geometry() != frameRect)
@@ -592,12 +601,6 @@ void QWidgetPrivate::show_sys()
#endif
data.fstrut_dirty = true;
invalidateBuffer(r);
- if (!q->testAttribute(Qt::WA_ShowWithoutActivating)
- && q->windowType() != Qt::Popup
- && q->windowType() != Qt::Tool
- && q->windowType() != Qt::ToolTip) {
- QWidget::qwsDisplay()->requestFocus(data.winid,true);
- }
bool staysontop =
(q->windowFlags() & Qt::WindowStaysOnTopHint)
|| q->windowType() == Qt::Popup;