diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-10-08 12:51:04 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@sosco.com> | 2009-10-08 12:53:10 (GMT) |
commit | 77eceb53ee6fc7f20570f070124cd4a5f79698ab (patch) | |
tree | db8dddd7ab4a2b1b3b2a3a527e0e5bf940f18728 | |
parent | 00b198b1cdf48bd88d61bb256ec3ff455735e38c (diff) | |
download | Qt-77eceb53ee6fc7f20570f070124cd4a5f79698ab.zip Qt-77eceb53ee6fc7f20570f070124cd4a5f79698ab.tar.gz Qt-77eceb53ee6fc7f20570f070124cd4a5f79698ab.tar.bz2 |
Remove incorrect optimisation in S60 widget / control stack sync
Incorrect optimisation - for popup windows, Qt's focus is moved before
hide_sys is called, resulting in the popup window keeping its elevated
position in the CONE control stack.
This can result in keyboard focus being in an invisible widget in some
conditions - e.g. QTBUG-4733
Task-number: QTBUG-4733
Reviewed-by: axis
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 3328cee..b0d405a 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -434,7 +434,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de void QWidgetPrivate::show_sys() { Q_Q(QWidget); - + if (q->testAttribute(Qt::WA_OutsideWSRange)) return; @@ -490,7 +490,12 @@ void QWidgetPrivate::hide_sys() QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId()); if (id) { - if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged() + //Incorrect optimisation - for popup windows, Qt's focus is moved before + //hide_sys is called, resulting in the popup window keeping its elevated + //position in the CONE control stack. + //This can result in keyboard focus being in an invisible widget in some + //conditions - e.g. QTBUG-4733 + //if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged() id->setFocusSafely(false); id->MakeVisible(false); if (QWidgetBackingStore *bs = maybeBackingStore()) @@ -1253,7 +1258,7 @@ void QWidget::grabMouse() WId id = effectiveWinId(); id->SetPointerCapture(true); QWidgetPrivate::mouseGrabber = this; - + #ifndef QT_NO_CURSOR QApplication::setOverrideCursor(cursor()); #endif |