193 |
193 |
194 if ( iCbaContainer ) |
194 if ( iCbaContainer ) |
195 { |
195 { |
196 CEikCba* cba = |
196 CEikCba* cba = |
197 static_cast< CEikCba* >( iCbaContainer->ButtonGroup() ); |
197 static_cast< CEikCba* >( iCbaContainer->ButtonGroup() ); |
198 |
198 |
199 if ( destination == cba && iCbaContainer->IsVisible() ) |
199 if ( destination == cba && iCbaContainer->IsVisible() ) |
200 { |
200 { |
201 CXnMenuAdapter* adapter( MenuAdapter( iMenuNode ) ); |
201 CXnMenuAdapter* adapter( MenuAdapter( iMenuNode ) ); |
202 |
202 |
203 if ( adapter ) |
203 if ( adapter ) |
204 { |
204 { |
205 TRAP_IGNORE( |
205 TRAP_IGNORE( |
206 adapter->HandlePointerEventL( *aEvent.Pointer() ) ); |
206 adapter->HandlePointerEventL( *aEvent.Pointer() ) ); |
|
207 } |
|
208 |
|
209 // if focus was lost due to longtap & button not being released |
|
210 // appui will set flag to ignorekeyevent for this control as it has |
|
211 // lost focus ( voice command become active ) after longtap detected. |
|
212 // this causes cba button to stay in pressed state. send this buttonup |
|
213 // event manually so that cba can draw itself correctly |
|
214 // case id: ou1cimx1#265200 |
|
215 if ( event.iType == TPointerEvent::EButton1Up && |
|
216 !cba->IsFocused() ) |
|
217 { |
|
218 TRAP_IGNORE( cba->HandlePointerEventL( event ) ); |
207 } |
219 } |
208 } |
220 } |
209 } |
221 } |
210 } |
222 } |
211 } |
223 } |
614 if ( iNode ) |
629 if ( iNode ) |
615 { |
630 { |
616 CXnViewData& activeViewData( |
631 CXnViewData& activeViewData( |
617 iUiEngine.ViewManager()->ActiveViewData() ); |
632 iUiEngine.ViewManager()->ActiveViewData() ); |
618 |
633 |
619 const CXnPluginData& pluginData( |
634 const CXnPluginData* pluginData( |
620 activeViewData.Plugin( iNode ) ); |
635 activeViewData.Plugin( iNode ) ); |
621 |
636 |
622 if ( &pluginData == &aPluginData ) |
637 if ( pluginData == &aPluginData ) |
623 { |
638 { |
624 // The plugin is removed which was holding focus |
639 // The plugin is removed which was holding focus |
625 ClearStateL(); |
640 ClearStateL(); |
626 } |
641 } |
627 } |
642 } |
659 CXnViewData& activeView( iUiEngine.ViewManager()->ActiveViewData() ); |
674 CXnViewData& activeView( iUiEngine.ViewManager()->ActiveViewData() ); |
660 |
675 |
661 // first, search only in plugins which have popup window open |
676 // first, search only in plugins which have popup window open |
662 for ( TInt i = 0; i < list.Count(); i++ ) |
677 for ( TInt i = 0; i < list.Count(); i++ ) |
663 { |
678 { |
664 CXnPluginData& plugin( activeView.Plugin( list[i] ) ); |
679 CXnPluginData* plugin( activeView.Plugin( list[i] ) ); |
665 if ( plugin.IsDisplayingPopup() ) |
680 if ( plugin && plugin->IsDisplayingPopup() ) |
666 { |
681 { |
667 plugin.InitialFocusNodesL( initial ); |
682 plugin->InitialFocusNodesL( initial ); |
668 } |
683 } |
669 } |
684 } |
670 |
685 |
671 // if no inital focus nodes were found in plugins with |
686 // if no inital focus nodes were found in plugins with |
672 // open popups, search again with all plugins |
687 // open popups, search again with all plugins |
673 if ( initial.Count() == 0 ) |
688 if ( initial.Count() == 0 ) |
674 { |
689 { |
675 for ( TInt i = 0; i < list.Count(); i++ ) |
690 for ( TInt i = 0; i < list.Count(); i++ ) |
676 { |
691 { |
677 CXnPluginData& plugin( activeView.Plugin( list[i] ) ); |
692 CXnPluginData* plugin( activeView.Plugin( list[i] ) ); |
678 plugin.InitialFocusNodesL( initial ); |
693 if ( plugin ) |
|
694 { |
|
695 plugin->InitialFocusNodesL( initial ); |
|
696 } |
679 } |
697 } |
680 } |
698 } |
681 |
699 |
682 // set initial focus |
700 // set initial focus |
683 SetInitialFocusL( initial ); |
701 SetInitialFocusL( initial ); |