diff -r f5907b1a1053 -r 0396474f30f5 emailuis/emailui/src/OverlayControl.cpp --- a/emailuis/emailui/src/OverlayControl.cpp Fri Mar 12 15:41:14 2010 +0200 +++ b/emailuis/emailui/src/OverlayControl.cpp Mon Mar 15 12:39:10 2010 +0200 @@ -70,19 +70,22 @@ void COverlayControl::HandlePointerEventL( const TPointerEvent& aPointerEvent ) { - if (aPointerEvent.iType == TPointerEvent::EButton1Down) + if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) { // Give feedback to user (vibration) - iTouchFeedBack->InstantFeedback(this, ETouchFeedbackBasic); + iTouchFeedBack->InstantFeedback( this, ETouchFeedbackBasic ); + SetPointerCapture( ETrue ); } - CCoeControl::HandlePointerEventL( aPointerEvent ); - - if( iObserver ) + if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) { - // Do not let leaves disturb the system - TRAP_IGNORE( - iObserver->HandleOverlayPointerEventL( this, aPointerEvent )); + if ( Rect().Contains( aPointerEvent.iPosition ) && iObserver ) + { + // Do not let leaves disturb the system - send event only if the poimter + // was pressed on this control + TRAP_IGNORE( iObserver->HandleOverlayPointerEventL( this, aPointerEvent ) ); + } + SetPointerCapture( EFalse ); } }