phoneapp/phoneui2/src/phoneapplication.cpp
changeset 76 cfea66083b62
parent 74 d1c62c765e48
child 78 baacf668fe89
--- a/phoneapp/phoneui2/src/phoneapplication.cpp	Fri Sep 17 17:09:12 2010 +0300
+++ b/phoneapp/phoneui2/src/phoneapplication.cpp	Mon Oct 04 16:06:10 2010 +0300
@@ -35,15 +35,13 @@
 {
     if (event->type() == QSymbianEvent::WindowServerEvent){
         const TWsEvent *wsevent = event->windowServerEvent();
-        switch( wsevent->Type()){
-            case EEventFocusGained:
+        if ( wsevent->Type() == EEventWindowVisibilityChanged ){
+            TUint visible = wsevent->VisibilityChanged()->iFlags;
+            if ( visible & TWsVisibilityChangedEvent::EFullyVisible ){
                 emit focusGained();
-                break;
-            case EEventFocusLost:
+            }else if (visible & TWsVisibilityChangedEvent::ENotVisible){
                 emit focusLost();
-                break;
-            default:
-                break;
+            }
         }
     }
     return HbApplication::symbianEventFilter(event);