diff -r 978afdc0236f -r 85902f042028 uifw/AvKon/src/aknnavi.cpp --- a/uifw/AvKon/src/aknnavi.cpp Tue Sep 14 21:48:24 2010 +0300 +++ b/uifw/AvKon/src/aknnavi.cpp Wed Sep 15 12:29:17 2010 +0300 @@ -32,6 +32,8 @@ #include #include +#include + // USER INCLUDE FILES #include "aknenv.h" #include "AknDef.h" @@ -2008,26 +2010,47 @@ // void CAknNavigationControlContainer::HandleLosingForeground() { - // If volume popup is shown when the navi pane loses foreground, - // then the popup needs to be closed if shown, and the volume control - // told that it's not the topmost control. + // Get the top control on navi pane. CAknNavigationDecorator* topControl = Top(); if ( topControl ) { - if ( topControl && - topControl->ControlType() == CAknNavigationDecorator::ENaviVolume ) + switch( topControl->ControlType() ) { - CAknVolumePopup* volumePopup = - static_cast ( - topControl->iDecoratedControl ); + case CAknNavigationDecorator::ENaviVolume: + { + // If volume popup is shown when the navi pane loses foreground, + // then the popup needs to be closed if shown, and the volume control + // told that it's not the topmost control. + CAknVolumePopup* volumePopup = + static_cast ( + topControl->iDecoratedControl ); - if ( volumePopup ) + if ( volumePopup ) + { + volumePopup->CloseVolumePopup(); + static_cast( + topControl->DecoratedControl() )->HandleNaviStackChange( EFalse ); + } + break; + } + case CAknNavigationDecorator::ETabGroup: { - volumePopup->CloseVolumePopup(); - static_cast( - topControl->DecoratedControl() )->HandleNaviStackChange( EFalse ); + // If tabgroup is shown when navi pane loses foreground, forward + // KAknMessageFocusLost event to tabgroup. Tab panes will stop highlighting + // the pressed tab. + CAknTabGroup* tabGroup = + static_cast ( + topControl->iDecoratedControl ); + + if ( tabGroup ) + { + tabGroup->HandleResourceChange(KAknMessageFocusLost); + } + break; } + default: + break; } } }