uifw/AvKon/src/akndiscreetpopupcontrol.cpp
branchRCL_3
changeset 16 71dd06cfe933
parent 9 aabf2c525e0f
child 18 0aa5fbdfbc30
--- a/uifw/AvKon/src/akndiscreetpopupcontrol.cpp	Wed Mar 31 21:59:52 2010 +0300
+++ b/uifw/AvKon/src/akndiscreetpopupcontrol.cpp	Wed Apr 14 16:14:00 2010 +0300
@@ -755,50 +755,53 @@
     const TPointerEvent& aPointerEvent )
     {
     TBool eventInRect( Rect().Contains( aPointerEvent.iPosition ) );
-
-    // Pointer down - set pressed-down state (popup completely visible while
-    // pressed-down)
-    if ( aPointerEvent.iType == TPointerEvent::EButton1Down
-         && eventInRect
-         && iInternalFlags.IsClear( EDismissed ) )
+    
+    // The discreet popup which is global won't handle pointer event if there is notifier be popping up.
+    if( !iInternalFlags.IsSet( EGlobal ) || iCoeEnv->RootWin().OrdinalPriority() < ECoeWinPriorityAlwaysAtFront ) 
         {
-        _AKNTRACE( "CAknDiscreetPopupControl::HandlePointerEventL, TPointerEvent::EButton1Down" );
-        SetPressedDownState( ETrue );
-        ImmediateFeedback( ETouchFeedbackSensitive );
-        }
-
-    // Pointer drag - reset pressed-down state if pointer out of popup area
-    else if ( aPointerEvent.iType == TPointerEvent::EDrag )
-        {
-        _AKNTRACE( "CAknDiscreetPopupControl::HandlePointerEventL, TPointerEvent::EDrag" );
-        iInternalFlags.Set( EDragged );
-        if ( !eventInRect && iInternalFlags.IsSet( EPressedDown ) )
+        // Pointer down - set pressed-down state (popup completely visible while
+        // pressed-down)
+        if ( aPointerEvent.iType == TPointerEvent::EButton1Down 
+        	 && eventInRect
+             && iInternalFlags.IsClear( EDismissed ) )
+            {
+            _AKNTRACE( "CAknDiscreetPopupControl::HandlePointerEventL, TPointerEvent::EButton1Down" );
+            SetPressedDownState( ETrue );
+            ImmediateFeedback( ETouchFeedbackSensitive );
+            }
+    
+        // Pointer drag - reset pressed-down state if pointer out of popup area
+        else if ( aPointerEvent.iType == TPointerEvent::EDrag )
             {
-            iInternalFlags.Clear( EPressedDown );
+            _AKNTRACE( "CAknDiscreetPopupControl::HandlePointerEventL, TPointerEvent::EDrag" );
+            iInternalFlags.Set( EDragged );
+            if ( !eventInRect && iInternalFlags.IsSet( EPressedDown ) )
+                {
+                iInternalFlags.Clear( EPressedDown );
+                }
+            else if ( eventInRect && !iInternalFlags.IsSet( EPressedDown ) )
+                {
+                iInternalFlags.Set( EPressedDown );
+                }
             }
-        else if ( eventInRect && !iInternalFlags.IsSet( EPressedDown ) )
-            {
-            iInternalFlags.Set( EPressedDown );
+    
+        // Pointer up - reset pressed-down state 
+        else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
+            {        
+            _AKNTRACE( "CAknDiscreetPopupControl::HandlePointerEventL, TPointerEvent::EButton1Up" );
+            if ( eventInRect )
+                {
+                NotifyObserverL();
+                }        
+            // Start fading away
+            if ( iInternalFlags.IsClear( EDismissed ) )
+                {
+                iInternalFlags.Set( EDismissed );
+                RequestExitL();
+                }
+            SetPressedDownState( EFalse );
             }
         }
 
-    // Pointer up - reset pressed-down state 
-    else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
-        {
-        _AKNTRACE( "CAknDiscreetPopupControl::HandlePointerEventL, TPointerEvent::EButton1Up" );
-        if ( eventInRect )
-            {
-            NotifyObserverL();
-            }
-        
-        // Start fading away
-        if ( iInternalFlags.IsClear( EDismissed ) )
-            {
-            iInternalFlags.Set( EDismissed );
-            RequestExitL();
-            }
-
-        SetPressedDownState( EFalse );
-        }
     }