INTEGRATION: CWS vcl87 (1.122.34); FILE MERGED

2008/03/15 16:00:33 pl 1.122.34.1: #i86392# close floaters on wheel command in FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE case
This commit is contained in:
Kurt Zenker 2008-04-03 16:06:01 +00:00
parent 98468607f7
commit ddd5281115

View file

@ -1559,6 +1559,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
BOOL bRet = TRUE;
// first check any floating window ( eg. drop down listboxes)
bool bIsFloat = false;
Window *pMouseWindow = NULL;
if ( pSVData->maWinData.mpFirstFloat && !pSVData->maWinData.mpCaptureWin &&
!pSVData->maWinData.mpFirstFloat->ImplIsFloatPopupModeWindow( pWindow ) )
@ -1570,12 +1571,15 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
if( !pMouseWindow )
pMouseWindow = pWindow->ImplFindWindow( aMousePos );
else
{
// transform coordinates to float window frame coordinates
pMouseWindow = pMouseWindow->ImplFindWindow(
pMouseWindow->OutputToScreenPixel(
pMouseWindow->AbsoluteScreenToOutputPixel(
pWindow->OutputToAbsoluteScreenPixel(
pWindow->ScreenToOutputPixel( aMousePos ) ) ) ) );
bIsFloat = true;
}
if ( pMouseWindow &&
pMouseWindow->IsEnabled() && pMouseWindow->IsInputEnabled() && ! pMouseWindow->IsInModalMode() )
@ -1608,6 +1612,20 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
}
}
// close floaters
if( ! bIsFloat && pSVData->maWinData.mpFirstFloat )
{
FloatingWindow* pLastLevelFloat = pSVData->maWinData.mpFirstFloat->ImplFindLastLevelFloat();
if( pLastLevelFloat )
{
ULONG nPopupFlags = pLastLevelFloat->GetPopupModeFlags();
if ( nPopupFlags & FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE )
{
pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL );
}
}
}
return !bRet;
}