src/gui/kernel/qwidget_s60.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 34 a33bf25e6f72
--- a/src/gui/kernel/qwidget_s60.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/gui/kernel/qwidget_s60.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -54,6 +54,7 @@
 
 #ifdef Q_WS_S60
 #include <aknappui.h>
+#include <eikbtgpc.h>
 #endif
 
 // This is necessary in order to be able to perform delayed invokation on slots
@@ -433,6 +434,7 @@
         // Request mouse move events.
         drawableWindow->PointerFilter(EPointerFilterEnterExit
             | EPointerFilterMove | EPointerFilterDrag, 0);
+        drawableWindow->EnableVisibilityChangeEvents();
 
         if (q->isVisible() && q->testAttribute(Qt::WA_Mapped)) {
             activateSymbianWindow(control.data());
@@ -487,11 +489,8 @@
                 && !S60->buttonGroupContainer() && !S60->statusPane()) {
 
             bool isFullscreen = q->windowState() & Qt::WindowFullScreen;
-            bool cbaRequested = q->windowFlags() & Qt::WindowSoftkeysVisibleHint;
 
-            // If the window is fullscreen and has not explicitly requested that the CBA be visible
-            // we delay the creation even more.
-            if ((!isFullscreen || cbaRequested) && !q->testAttribute(Qt::WA_DontShowOnScreen)) {
+            if (!q->testAttribute(Qt::WA_DontShowOnScreen)) {
 
                 // Create the status pane and CBA here
                 CEikAppUi *ui = static_cast<CEikAppUi *>(S60->appUi());
@@ -740,9 +739,6 @@
     if (!q->testAttribute(Qt::WA_WState_Created) || !q->testAttribute(Qt::WA_TranslucentBackground))
         return;
 
-    if ((data.window_flags & Qt::FramelessWindowHint) == 0)
-        return;
-
     RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
 
 #ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
@@ -911,14 +907,12 @@
 
 void QWidgetPrivate::createTLSysExtra()
 {
-    extra->topextra->backingStore = 0;
     extra->topextra->inExpose = 0;
 }
 
 void QWidgetPrivate::deleteTLSysExtra()
 {
-    delete extra->topextra->backingStore;
-    extra->topextra->backingStore = 0;
+    extra->topextra->backingStore.destroy();
 }
 
 void QWidgetPrivate::createSysExtra()
@@ -1089,12 +1083,14 @@
     Qt::WindowStates oldstate = windowState();
 
     const TBool isFullscreen = newstate & Qt::WindowFullScreen;
+#ifdef Q_WS_S60
     const TBool cbaRequested = windowFlags() & Qt::WindowSoftkeysVisibleHint;
     const TBool cbaVisible = CEikButtonGroupContainer::Current() ? true : false;
     const TBool softkeyVisibilityChange = isFullscreen && (cbaRequested != cbaVisible);
 
     if (oldstate == newstate && !softkeyVisibilityChange)
         return;
+#endif // Q_WS_S60
 
     if (isWindow()) {
         createWinId();
@@ -1181,6 +1177,7 @@
 void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
 {
     Q_D(QWidget);
+    d->aboutToDestroy();
     if (!isWindow() && parentWidget())
         parentWidget()->d_func()->invalidateBuffer(geometry());
     d->deactivateWidgetCleanup();