javauis/lcdui_akn/lcdui/src/CMIDMenuHandler.cpp
branchRCL_3
changeset 60 6c158198356e
parent 19 04becd199f91
--- a/javauis/lcdui_akn/lcdui/src/CMIDMenuHandler.cpp	Thu Jul 15 18:31:06 2010 +0300
+++ b/javauis/lcdui_akn/lcdui/src/CMIDMenuHandler.cpp	Thu Aug 19 09:48:13 2010 +0300
@@ -44,6 +44,8 @@
 #include "lcdui.h"
 #include <j2me/jdebug.h>
 #include "CMIDUIManager.h"
+#include "coreuiavkonlcdui.h"
+#include "coreuiappui.h"
 
 
 const TInt KResolutionStringLength = 4;
@@ -201,23 +203,24 @@
 //
 void CMIDMenuHandler::SendMultipleKeyPressedEvent()
 {
-    ASSERT(iDisplayable);
-
-    RWsSession  wsSession = CCoeEnv::Static()->WsSession();
-    TWsEvent event;
-
-    // Check the current Display type if it is canvas enable the
-    // multiple key events, other wise disable it.
-    MMIDComponent* component = iDisplayable->Component();
-    MMIDComponent::TType type = component->Type();
-
-    if (type == MMIDComponent::ECanvas)
-        event.SetType(EEnableMultipleKeyPressedEvent); // set event type enable multiple key pressed event
-    else
-        event.SetType(EDisableMultipleKeyPressedEvent); // set event type disable multiple key pressed event
-    event.SetTimeNow(); // set the event time
-    event.SetHandle(wsSession.WsHandle()); // set window server handle
-    wsSession.SendEventToAllWindowGroups(event);
+    ASSERT(iDisplayable);    
+    java::ui::CoreUiAvkonAppUi* appUi =
+        java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi();
+    if (appUi)
+    {
+        MMIDComponent* component = iDisplayable->Component();
+        if (component)
+        {
+            if (component->Type() == MMIDComponent::ECanvas)
+            {
+                appUi->glueSetKeyBlockMode(ENoKeyBlock);
+            }
+            else
+            {
+                appUi->glueSetKeyBlockMode(EDefaultBlockMode);
+            }
+        }
+    }
 }