summaryrefslogtreecommitdiff
path: root/vcl/source/window/winproc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/winproc.cxx')
-rw-r--r--vcl/source/window/winproc.cxx18
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;
}