summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp32
1 files changed, 13 insertions, 19 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 899147fb35..31d02d4b06 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -74,6 +74,7 @@
# include <centralrepository.h>
# include "qs60mainappui.h"
# include "qinputcontext.h"
+# include <private/qgraphicssystemex_symbian_p.h>
#endif
#if defined(Q_WS_S60)
@@ -1850,26 +1851,12 @@ void qt_init(QApplicationPrivate * /* priv */, int)
#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
QApplicationPrivate::instance()->useTranslucentEGLSurfaces = true;
- const TUid KIvePropertyCat = {0x2726beef};
- enum TIvePropertyChipType {
- EVCBCM2727B1 = 0x00000000,
- EVCBCM2763A0 = 0x04000100,
- EVCBCM2763B0 = 0x04000102,
- EVCBCM2763C0 = 0x04000103,
- EVCBCM2763C1 = 0x04000104,
- EVCBCMUnknown = 0x7fffffff
- };
-
- TInt chipType = EVCBCMUnknown;
- if (RProperty::Get(KIvePropertyCat, 0 /*chip type*/, chipType) == KErrNone) {
- if (chipType == EVCBCM2727B1) {
- // We have only 32MB GPU memory. Use raster surfaces
- // for transparent TLWs.
- QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
- }
- } else {
+ if (QSymbianGraphicsSystemEx::hasBCM2727()) {
+ // We have only 32MB GPU memory. Use raster surfaces
+ // for transparent TLWs.
QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
}
+
if (QApplicationPrivate::graphics_system_name == QLatin1String("raster"))
QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
#else
@@ -2027,7 +2014,7 @@ void QApplicationPrivate::openPopup(QWidget *popup)
QApplicationPrivate::popupWidgets->append(popup);
// Cancel focus widget pointer capture and long tap timer
- if (QApplication::focusWidget()) {
+ if (QApplication::focusWidget() && QApplication::focusWidget()->effectiveWinId()) {
static_cast<QSymbianControl*>(QApplication::focusWidget()->effectiveWinId())->CancelLongTapTimer();
QApplication::focusWidget()->effectiveWinId()->SetPointerCapture(false);
}
@@ -2278,6 +2265,7 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent
#if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS)
case EEventDisplayChanged:
#endif
+ {
if (callSymbianEventFilters(symbianEvent))
return 1;
if (S60)
@@ -2289,6 +2277,12 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent
QResizeEvent e(qt_desktopWidget->size(), oldSize);
QApplication::sendEvent(qt_desktopWidget, &e);
}
+ // Close non-native QMenus (that should act like context menus, i.e. close
+ // automatically when the orientation changes).
+ QMenu *activeMenu = qobject_cast<QMenu *>(QApplication::activePopupWidget());
+ if (activeMenu)
+ activeMenu->close();
+ }
return 0; // Propagate to CONE
case EEventWindowVisibilityChanged:
if (controlInMap) {