--- a/emailuis/emailui/src/ncsheadercontainer.cpp Mon Jan 18 20:08:26 2010 +0200
+++ b/emailuis/emailui/src/ncsheadercontainer.cpp Tue Jan 26 11:45:42 2010 +0200
@@ -199,7 +199,14 @@
{
FUNC_LOG;
- CCoeControl* focused = FindFocused();
+ CCoeControl* focused = iFocused;
+
+ if ( !focused )
+ {
+ focused = FindFocused();
+ iFocused = focused;
+ }
+
if ( !IsFocused() )
{
if ( focused )
@@ -213,7 +220,7 @@
// Remove MSK label when header loses focus
TRAP_IGNORE( SetMskL() );
}
- else if ( IsFocused() && !focused && !iRALInProgress )
+ else if ( IsFocused() && !focused )
{
// We're gaining focus from the message body
// Set the focus to the last control in the control array
@@ -224,6 +231,20 @@
}
}
+// ---------------------------------------------------------------------------
+// CNcsHeaderContainer::ShowCursor
+// ---------------------------------------------------------------------------
+//
+void CNcsHeaderContainer::ShowCursor( TBool aShow )
+ {
+ CCoeControl* focused = FindFocused();
+ if ( focused )
+ {
+ iFocused = focused;
+ }
+ iFocused->SetFocus( aShow, EDrawNow );
+ }
+
// -----------------------------------------------------------------------------
// CNcsHeaderContainer::Draw() const
// Draws the display
@@ -503,8 +524,9 @@
( aKeyEvent.iCode == EKeyEnter ||
aKeyEvent.iScanCode == EStdKeyEnter) )
{
- ret = FindFocused()->OfferKeyEventL( aKeyEvent, aType );
- return EKeyWasConsumed;
+ FindFocused()->OfferKeyEventL( aKeyEvent, aType );
+ ret = EKeyWasConsumed;
+ doScroll = ETrue;
}
}
}
@@ -1309,13 +1331,9 @@
addressField = static_cast<CNcsAddressInputField*>( focused );
HBufC* lookupText = addressField->GetLookupTextLC();
CPbkxRemoteContactLookupServiceUiContext::TResult::TExitReason ex;
- // set focus to false for header - the focus should be on popup
- focused->SetFocus( EFalse, ENoDrawNow );
CNcsEmailAddressObject* address = ExecuteRemoteSearchL(
ex, *lookupText );
iRALInProgress = EFalse;
- // set focus back to on
- focused->SetFocus( ETrue, ENoDrawNow );
if ( address )
{
CleanupStack::PushL( address );