summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-07-09 09:36:37 (GMT)
committeraxis <qt-info@nokia.com>2009-07-09 09:49:13 (GMT)
commitb6377f43410b14125a66ffd02acde69cfb6e455e (patch)
treeee150876b60fa127037efa302640de42060a3230 /src/gui/kernel/qapplication_s60.cpp
parentf9dcdb8ca49a67b6bd0a191bf622efb2efe9111b (diff)
downloadQt-b6377f43410b14125a66ffd02acde69cfb6e455e.zip
Qt-b6377f43410b14125a66ffd02acde69cfb6e455e.tar.gz
Qt-b6377f43410b14125a66ffd02acde69cfb6e455e.tar.bz2
Switched to asynchronous focus handling on Symbian.
This was done in order to be more in line with what other platforms (at least X11) do. In addition, it prevents show() from entering event handlers in Qt. That should only happen in processEvents(). This required the introduction of a new event, SymbianDeferredFocusChanged, which we post whenever there is a focus change. RevBy: Jason Barron AutoTest: Passed
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index b954ddb..dd05806 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -659,20 +659,8 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
|| (qwidget->windowType() & Qt::Popup) == Qt::Popup)
return;
- if (IsFocused()) {
- QApplication::setActiveWindow(qwidget);
- // If widget is fullscreen, hide status pane and button container
- // otherwise show them.
- CEikStatusPane* statusPane = S60->statusPane();
- CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer();
- bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
- if (statusPane && (statusPane->IsVisible() == isFullscreen))
- statusPane->MakeVisible(!isFullscreen);
- if (buttonGroup && (buttonGroup->IsVisible() == isFullscreen))
- buttonGroup->MakeVisible(!isFullscreen);
- } else {
- QApplication::setActiveWindow(0);
- }
+ QEvent *deferredFocusEvent = new QEvent(QEvent::SymbianDeferredFocusChanged);
+ QApplication::postEvent(qwidget, deferredFocusEvent);
}
void QSymbianControl::HandleResourceChange(int resourceType)