diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-11-23 09:25:44 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-11-23 09:26:30 (GMT) |
commit | b66c4141617eecb7a988287d9708499070ea9745 (patch) | |
tree | e3922c6c52d10262b782d43f1ed9392c09508dbd /src/gui/kernel/qapplication_s60.cpp | |
parent | 76b66d6da548ce4a247727f14e09b1d301330db5 (diff) | |
download | Qt-b66c4141617eecb7a988287d9708499070ea9745.zip Qt-b66c4141617eecb7a988287d9708499070ea9745.tar.gz Qt-b66c4141617eecb7a988287d9708499070ea9745.tar.bz2 |
Removed window activation hack, unified and fixed title&icon setting.
The window activation hack is not needed anynmore since
AppUi()->RemoveFromStack() ensures the next visible window will get
the keyboard focus.
Hack removal also required change to window title setting logic.
Since window title (and icon) are associated to top-level windows,
the logical place to set them is the same place where active window is
changed i.e. QApplication::setActiveWindow is called.
At the same time also window icon setting from show_sys was move to
focusChanged to make icon/title setting more consistent.
When changing orientation or switching to different statuspane
mode we receive KInternalStatusPaneChange events for each window in
QSymbianControl::HandleResourceChange. When receiving such event
we only need to reset the icon for focused/visible window. If we don't
handle it like this, it might happen that invisible widget added to
control stack resets the global icon/title.
Task-number: QTBUG-5780
Reviewed-by: Axis
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 85b6d00..fb2bc72 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -908,6 +908,8 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) } QApplication::setActiveWindow(qwidget->window()); + qwidget->d_func()->setWindowIcon_sys(true); + qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); #ifdef Q_WS_S60 // If widget is fullscreen, hide status pane and button container // otherwise show them. @@ -945,7 +947,10 @@ void QSymbianControl::HandleResourceChange(int resourceType) TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); SetExtent(r.iTl, r.Size()); } - qwidget->d_func()->setWindowIcon_sys(true); + if (IsFocused() && IsVisible()) { + qwidget->d_func()->setWindowIcon_sys(true); + qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); + } break; case KUidValueCoeFontChangeEvent: // font change event |