[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Jun 27 05:25:19 PDT 2014
vcl/source/window/winproc.cxx | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
New commits:
commit d1a185f3af74ac4c6fe29e3d54c17133cd8d2db1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 27 13:21:01 2014 +0100
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
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 1a343a6..e98f7dd 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -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(
More information about the Libreoffice-commits
mailing list