send wheel scroll events of disabled widgets to its enabled parent first

on scrolling with the wheel scroll if the pointer ends up over a disabled
widget then the event doesn't go to its parent and so the scrolling
halts unless the window happens to be the focus window

Change-Id: I57566b5c6e395e0f62d6b928f28e47a0c3486d65
This commit is contained in:
Caolán McNamara
2014-06-27 13:21:01 +01:00
parent d75049f978
commit d1a185f3af

View File

@@ -1361,6 +1361,11 @@ static bool ImplCallWheelCommand( Window* pWindow, const Point& rPos,
return false; return false;
} }
static bool acceptableWheelScrollTarget(const Window *pMouseWindow)
{
return (pMouseWindow && pMouseWindow->IsInputEnabled() && !pMouseWindow->IsInModalMode());
}
static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEvt, bool scaleDirectly = false ) static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEvt, bool scaleDirectly = false )
{ {
ImplDelData aDogTag( pWindow ); ImplDelData aDogTag( pWindow );
@@ -1418,8 +1423,15 @@ static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
bIsFloat = true; bIsFloat = true;
} }
if ( pMouseWindow && while (acceptableWheelScrollTarget(pMouseWindow))
pMouseWindow->IsEnabled() && pMouseWindow->IsInputEnabled() && ! pMouseWindow->IsInModalMode() ) {
if (pMouseWindow->IsEnabled())
break;
//try the parent if this one is disabled
pMouseWindow = pMouseWindow->GetParent();
}
if (acceptableWheelScrollTarget(pMouseWindow) && !pMouseWindow->IsInModalMode())
{ {
// transform coordinates to float window frame coordinates // transform coordinates to float window frame coordinates
Point aRelMousePos( pMouseWindow->OutputToScreenPixel( Point aRelMousePos( pMouseWindow->OutputToScreenPixel(