diff -r 38529f706030 -r 544e34b3255a phoneuis/dialer/src/cdialerkeypadcontainer.cpp --- a/phoneuis/dialer/src/cdialerkeypadcontainer.cpp Wed Mar 31 21:30:06 2010 +0300 +++ b/phoneuis/dialer/src/cdialerkeypadcontainer.cpp Wed Apr 14 15:56:42 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include // for KDC_APP_RESOURCE_DIR @@ -515,11 +515,15 @@ // This is needed when dialer control disappeares during keypress. // Last pressed pointer event must be forwarted to framework // as pointer up event. Thus button is set to unpressed state etc. + // This code calls HandlePointerEventL of the parent class instead of this. + // If we call this classes HandlePointerEventL, this classes + // grab status is not cleared, and later coming EButton1Up events may end + // up erroneously to this class, although intended elsewhere. // - if ( !aVisible && iButtonPressedDown ) + if ( !aVisible && iButtonPressedDown && Parent() ) { iPointerEvent.iType = TPointerEvent::EButton1Up; - TRAP_IGNORE( HandlePointerEventL( iPointerEvent ) ); + TRAP_IGNORE( Parent()->HandlePointerEventL( iPointerEvent ) ); } CCoeControl::MakeVisible( aVisible ); } @@ -558,11 +562,15 @@ // This is needed when dialer control disappeares during keypress. // Last pressed pointer event must be forwarted to framework // as pointer up event. Thus button is set to unpressed state etc. + // This code calls HandlePointerEventL of the parent class instead of this. + // If we call this classes HandlePointerEventL, this classes + // grab status is not cleared, and later coming EButton1Up events may end + // up erroneously to this class, although intended elsewhere. // - if ( iButtonPressedDown ) + if ( iButtonPressedDown && Parent() ) { iPointerEvent.iType = TPointerEvent::EButton1Up; - TRAP_IGNORE( HandlePointerEventL( iPointerEvent ) ); + TRAP_IGNORE( Parent()->HandlePointerEventL( iPointerEvent ) ); } }