backsteppingsrv/src/bsserver.cpp
branchRCL_3
changeset 101 9e077f9a342c
parent 0 79c6a41cd166
--- a/backsteppingsrv/src/bsserver.cpp	Wed Jun 09 10:01:25 2010 +0300
+++ b/backsteppingsrv/src/bsserver.cpp	Mon Jun 21 16:00:38 2010 +0300
@@ -27,8 +27,6 @@
 #include "bsdebug.h"
 #include "bsserver.h"
 
-const TInt idsArrayGranularity = 30;
-
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -174,6 +172,7 @@
     ui->PrepareToExit( );
 
     }
+
 // -----------------------------------------------------------------------------
 // Create and start the server.
 // -----------------------------------------------------------------------------
@@ -230,6 +229,7 @@
     SetAutoForwarding(ETrue); 
     User::SetPriorityControl(EFalse);
     }
+
 // -----------------------------------------------------------------------------
 // 
 // -----------------------------------------------------------------------------
@@ -243,12 +243,11 @@
 // -----------------------------------------------------------------------------
 //
 void CBSServer::CBSAppUi::HandleWsEventL( const TWsEvent& aEvent,
-    CCoeControl* /*aDestination*/)
+    CCoeControl* aDestination)
     {
     if ( aEvent.Type( ) == EEventFocusGroupChanged 
         || aEvent.Type( ) == EEventWindowGroupsChanged )
         {
-
         TInt windowsGroupID = iCoeEnv->WsSession().GetFocusWindowGroup( );
         CApaWindowGroupName* apaWGName = CApaWindowGroupName::NewLC(
             iCoeEnv->WsSession( ), windowsGroupID );
@@ -261,37 +260,7 @@
             iEngine->HandleFocusChangeL( uid );
             }
         }
-    else if( aEvent.Type( ) == EEventKeyDown ) 
-        {
-        iEngine->ApplicationKeyWasPressed( );
-        ForwardEventL( aEvent );     
-        }
-    else if( aEvent.Type( ) == EEventKeyUp )
-        {
-        ForwardEventL( aEvent );     
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// 
-// -----------------------------------------------------------------------------
-//
-void CBSServer::CBSAppUi::ForwardEventL( const TWsEvent& aEvent )
-    {
-    CArrayFixFlat<TInt>* idArray = 
-                    new (ELeave) CArrayFixFlat<TInt>( idsArrayGranularity );
-    iCoeEnv->WsSession().WindowGroupList( idArray );
-    
-    TInt ownId = iCoeEnv->RootWin().Identifier();
-    for( TInt x(0); x < idArray->Count(); x++ )
-        {
-        if( (*idArray)[x] != ownId )
-            {
-            iCoeEnv->WsSession().SendEventToWindowGroup( 
-                                                    (*idArray)[x], aEvent );
-            }
-        }
-    delete idArray;
+    CEikAppUi::HandleWsEventL( aEvent, aDestination );
     }
 
 // -----------------------------------------------------------------------------
@@ -307,8 +276,6 @@
     iCoeEnv->RootWin().EnableGroupChangeEvents( );
     //disable notifications about layout change
     iCoeEnv->RootWin().DisableScreenChangeEvents();
-    //get notifications about application key event
-    iCoeEnv->RootWin().CaptureKeyUpAndDowns( EStdKeyApplication0, 0, 0 );
     }
 
 // ============================= LOCAL FUNCTIONS ===============================