diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-04-03 16:06:01 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-04-03 16:06:01 +0000 |
commit | ddd528111536c9940f108ecdb4e5939fc79949c7 (patch) | |
tree | 4219bafecf357db665bd88508962ba1c3263dbb7 /vcl/source/window/winproc.cxx | |
parent | 98468607f7a8d0b1f5f7e3ecd09f756aea904d00 (diff) |
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
Diffstat (limited to 'vcl/source/window/winproc.cxx')
-rw-r--r-- | vcl/source/window/winproc.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 2298b8b1e87b..54a9220dddfe 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -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; } |