summaryrefslogtreecommitdiff
path: root/vcl/source/control/lstbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/lstbox.cxx')
-rw-r--r--vcl/source/control/lstbox.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 476c5d8f4b7f..553ea46f3bce 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -960,10 +960,19 @@ long ListBox::PreNotify( NotifyEvent& rNEvt )
(rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) &&
(rNEvt.GetWindow() == mpImplWin) )
{
- if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() )
+ USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() );
+ if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS )
+ || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY )
+ && HasChildPathFocus()
+ )
+ )
+ {
nDone = mpImplLB->HandleWheelAsCursorTravel( *rNEvt.GetCommandEvent() );
+ }
else
+ {
nDone = 0; // don't eat this event, let the default handling happen (i.e. scroll the context)
+ }
}
}