diff -r ff572dfe6d86 -r 9674c1a575e9 idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp Fri Mar 12 15:41:49 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp Mon Mar 15 12:39:47 2010 +0200 @@ -21,7 +21,6 @@ #include #include #include -//skinning support #include #include #include @@ -39,6 +38,7 @@ #include "xncontroladapterimpl.h" #include "xncontroladapter.h" #include "xnmenuadapter.h" +#include "xnviewcontroladapter.h" #include "xncomponentnodeimpl.h" #include "xntype.h" #include "xnnodepluginif.h" @@ -60,7 +60,6 @@ #include "xnscrollablecontroladapter.h" #include "xnfocuscontrol.h" #include "xneditmode.h" -#include "xnbgcontrol.h" _LIT8(KScrollableBoxNodeName, "scrollablebox"); @@ -3521,6 +3520,8 @@ if ( control && control->RefusesFocusLoss() ) { + focused->HideTooltipsL(); + // It is now time to give up holding focus focused->UnsetStateL( XnPropertyNames::style::common::KFocus ); @@ -3897,14 +3898,17 @@ CancelFocusRefusalL( *engine ); appui.HideFocus(); - - CCoeControl& bg( appui.ViewAdapter().BgControl() ); + + if ( !menuBar ) + { + CXnViewControlAdapter* control = static_cast< CXnViewControlAdapter* >( + appui.ViewManager().ActiveViewData().ViewNode()->Control() ); + + control->IgnoreEventsUntilNextPointerUp(); + control->ResetGrabbing(); + } - // Ignore events - bg.IgnoreEventsUntilNextPointerUp(); - static_cast(&bg)->ResetGrabbingL(); - - // Indicate long tap has taken plave + // Indicate long tap has taken plave iLongtap = ETrue; CXnNode* hold = BuildTriggerNodeL( *engine, @@ -3938,9 +3942,13 @@ if( PassEventToGestureHelperL( aPointerEvent ) ) { CXnAppUiAdapter& appui( engine->AppUiAdapter() ); - CCoeControl& bg( appui.ViewAdapter().BgControl() ); - static_cast(&bg)->ResetGrabbingL(); + CXnViewData& data( appui.ViewManager().ActiveViewData() ); + CXnViewControlAdapter* control = + static_cast< CXnViewControlAdapter* >( data.ViewNode()->Control() ); + + control->ResetGrabbing(); + // Swipe took place, consume this event return ETrue; } @@ -3962,7 +3970,8 @@ CAknLongTapDetector* detector( iAdapter->LongTapDetector() ); - if ( detector && !engine->IsPartialInputActive()) + if ( ( detector && ( !engine->IsPartialInputActive() || + event.iType == TPointerEvent::EButton1Up ) ) ) { if ( menuBar ) { @@ -4025,7 +4034,7 @@ XnPropertyNames::style::common::KFocus, XnEventSource::EStylus ); node->SetStateL( - XnPropertyNames::style::common::KPressedDown ); + XnPropertyNames::style::common::KPressedDown ); } } else if ( event.iType == TPointerEvent::EDrag ) @@ -4035,8 +4044,15 @@ if ( !node->MarginRect().Contains( event.iPosition ) ) { // Remove pressed down - node->UnsetStateL( XnPropertyNames::style::common::KPressedDown ); - } + node->UnsetStateL( + XnPropertyNames::style::common::KPressedDown ); + } + if ( node->MarginRect().Contains( event.iPosition ) ) + { + // Add pressed down + node->SetStateL( + XnPropertyNames::style::common::KPressedDown ); + } } } else if ( event.iType == TPointerEvent::EButton1Up ) @@ -5895,15 +5911,15 @@ } } - TSwipeResult result( iGestureHelper->HandlePointerEventL( aPointerEvent ) ); + TXnGestureCode result( iGestureHelper->HandlePointerEventL( aPointerEvent ) ); const TDesC8* swipe( NULL ); - if ( result == ESwipeLeft ) + if ( result == EGestureSwipeLeft ) { swipe = &XnPropertyNames::action::trigger::name::swipe::direction::KLeft; } - else if ( result == ESwipeRight ) + else if ( result == EGestureSwipeRight ) { swipe = &XnPropertyNames::action::trigger::name::swipe::direction::KRight; }