From 54601b563fb1935c901fc99046ca35dd6d90d1c7 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 31 Mar 2011 15:49:46 +0300 Subject: Do not set focus unnecessarily at window activation in Symbian Calling QSymbianControl::setFocusSafely(true) on currently focused window causes the next window in stack to get the focus momentarily, leading to various softkey problems, such as leaving child window's softkeys around when child is closed and flickering softkeys when child is opened. Added a check to QWidget::activateWindow to avoid calling setFocusSafely for already focused windows. Task-number: QTBUG-18409 Reviewed-by: Sami Merila Reviewed-by: axis --- src/gui/kernel/qwidget_s60.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index e7d5e95..8b57701 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1451,7 +1451,8 @@ void QWidget::activateWindow() if (tlw->isVisible()) { window()->createWinId(); QSymbianControl *id = static_cast(tlw->internalWinId()); - id->setFocusSafely(true); + if (!id->IsFocused()) + id->setFocusSafely(true); } } -- cgit v0.12