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:
@@ -1361,6 +1361,11 @@ static bool ImplCallWheelCommand( Window* pWindow, const Point& rPos,
|
||||
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 )
|
||||
{
|
||||
ImplDelData aDogTag( pWindow );
|
||||
@@ -1418,8 +1423,15 @@ static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
|
||||
bIsFloat = true;
|
||||
}
|
||||
|
||||
if ( pMouseWindow &&
|
||||
pMouseWindow->IsEnabled() && pMouseWindow->IsInputEnabled() && ! pMouseWindow->IsInModalMode() )
|
||||
while (acceptableWheelScrollTarget(pMouseWindow))
|
||||
{
|
||||
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
|
||||
Point aRelMousePos( pMouseWindow->OutputToScreenPixel(
|
||||
|
Reference in New Issue
Block a user