uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp
branchRCL_3
changeset 25 941195f2d488
parent 23 3d340a0166ff
child 50 a1caeb42b3a3
--- a/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp	Tue May 25 12:58:19 2010 +0300
@@ -24,6 +24,7 @@
 #include <eikapp.h>
 #include <aknappui.h>
 #include <AknDef.h>
+#include <touchfeedback.h>
 
 #include "aknstyluspopupmenu.h"
 #include "aknstyluspopupmenucontent.h"
@@ -195,7 +196,18 @@
     
     TSize size(iController->Size());
     iController->ShowPopUp();
-
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        MTouchFeedback* feedback = MTouchFeedback::Instance();
+        if ( feedback )
+            {
+            feedback->InstantFeedback(
+                    iContent,
+                    ETouchFeedbackPopUp,
+                    ETouchFeedbackVibra,
+                    TPointerEvent() );
+            }
+        }
     if ( size.iWidth == 0 && size.iHeight == 0 )
         {
         if ( iPositionType != KErrNotFound )
@@ -391,8 +403,10 @@
             TBool isDeleted = EFalse;
             iIsDeleted = &isDeleted;
 
+            CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
             iMenuObserver->ProcessCommandL( iContent->CurrentCommandId() );
-
+            CleanupStack::Pop();
+            
             if ( isDeleted )
                 {
                 return;
@@ -510,3 +524,12 @@
         iController = NULL;
         }
     }
+
+// -----------------------------------------------------------------------------
+// CAknStylusPopUpMenu::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CAknStylusPopUpMenu::CleanLocalRef( TAny* any )
+    {
+    static_cast<CAknStylusPopUpMenu*>( any )->iIsDeleted = NULL;
+    }