diff options
author | axis <qt-info@nokia.com> | 2009-07-09 09:36:37 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-07-09 09:49:13 (GMT) |
commit | b6377f43410b14125a66ffd02acde69cfb6e455e (patch) | |
tree | ee150876b60fa127037efa302640de42060a3230 /src/gui/kernel/qapplication_s60.cpp | |
parent | f9dcdb8ca49a67b6bd0a191bf622efb2efe9111b (diff) | |
download | Qt-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.cpp | 16 |
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) |