summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-11-23 11:25:44 +0200
committerJanne Anttila <janne.anttila@digia.com>2009-11-23 11:26:30 +0200
commitb66c4141617eecb7a988287d9708499070ea9745 (patch)
treee3922c6c52d10262b782d43f1ed9392c09508dbd /src/gui/kernel/qwidget_s60.cpp
parent76b66d6da548ce4a247727f14e09b1d301330db5 (diff)
downloadqt4-tools-b66c4141617eecb7a988287d9708499070ea9745.tar.gz
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/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index b1c37d3bc9..359df2abb5 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -488,12 +488,6 @@ void QWidgetPrivate::show_sys()
if(q->isWindow())
id->setFocusSafely(true);
-
- // Force setting of the icon after window is made visible,
- // this is needed even WA_SetWindowIcon is not set, as in that case we need
- // to reset to the application level window icon
- if(q->isWindow())
- setWindowIcon_sys(true);
}
invalidateBuffer(q->rect());
@@ -1180,18 +1174,6 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
if (id->IsFocused()) // Avoid unnecessry calls to FocusChanged()
id->setFocusSafely(false);
id->ControlEnv()->AppUi()->RemoveFromStack(id);
-
- // Hack to activate window under destroyed one. With this activation
- // the next visible window will get keyboard focus
- WId wid = CEikonEnv::Static()->AppUi()->TopFocusedControl();
- if (wid) {
- QWidget *widget = QWidget::find(wid);
- QApplication::setActiveWindow(widget);
- if (widget) {
- // Reset global window title for focusing window
- widget->d_func()->setWindowTitle_sys(widget->windowTitle());
- }
- }
}
}