diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/settings.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 11 | ||||
-rw-r--r-- | vcl/source/control/lstbox.cxx | 11 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 15 |
5 files changed, 35 insertions, 15 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 12213c25a64f..444f1f58c8fb 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -189,7 +189,7 @@ ImplMouseData::ImplMouseData() mnActionDelay = 250; mnMenuDelay = 150; mnFollow = MOUSE_FOLLOW_MENU | MOUSE_FOLLOW_DDLIST; - mbNoWheelActionWithoutFocus = FALSE; + mnWheelBehavior = MOUSE_WHEEL_FOCUS_ONLY; } // ----------------------------------------------------------------------- @@ -217,7 +217,7 @@ ImplMouseData::ImplMouseData( const ImplMouseData& rData ) mnActionDelay = rData.mnActionDelay; mnMenuDelay = rData.mnMenuDelay; mnFollow = rData.mnFollow; - mbNoWheelActionWithoutFocus = rData.mbNoWheelActionWithoutFocus; + mnWheelBehavior = rData.mnWheelBehavior; } // ----------------------------------------------------------------------- @@ -308,7 +308,7 @@ BOOL MouseSettings::operator ==( const MouseSettings& rSet ) const (mpData->mnActionDelay == rSet.mpData->mnActionDelay) && (mpData->mnMenuDelay == rSet.mpData->mnMenuDelay) && (mpData->mnFollow == rSet.mpData->mnFollow) && - (mpData->mbNoWheelActionWithoutFocus == rSet.mpData->mbNoWheelActionWithoutFocus) ) + (mpData->mnWheelBehavior == rSet.mpData->mnWheelBehavior ) ) return TRUE; else return FALSE; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 42abe3fd248a..309acb404750 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -876,10 +876,19 @@ long ComboBox::Notify( NotifyEvent& rNEvt ) (rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL) && (rNEvt.GetWindow() == mpSubEdit) ) { - 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) + } } return nDone ? nDone : Edit::Notify( rNEvt ); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 66722b70eef8..687352716ae8 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -959,10 +959,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) + } } } diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 3f8779dc2e90..0d656da40ba7 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -599,7 +599,12 @@ long SpinField::Notify( NotifyEvent& rNEvt ) { if ( ( rNEvt.GetCommandEvent()->GetCommand() == COMMAND_WHEEL ) && !IsReadOnly() ) { - if( ! GetSettings().GetMouseSettings().GetNoWheelActionWithoutFocus() || HasChildPathFocus() ) + USHORT nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() ); + if ( ( nWheelBehavior == MOUSE_WHEEL_ALWAYS ) + || ( ( nWheelBehavior == MOUSE_WHEEL_FOCUS_ONLY ) + && HasChildPathFocus() + ) + ) { const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData(); if ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 279775d712e4..86d6347617b0 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -5844,18 +5844,15 @@ void Window::UpdateSettings( const AllSettings& rSettings, BOOL bChild ) ImplInitResolutionSettings(); /* #i73785# - * do not overwrite a NoWheelActionWithoutFocus with false - * this looks kind of a hack, but NoWheelActionWithoutFocus + * do not overwrite a WheelBehavior with false + * this looks kind of a hack, but WheelBehavior * is always a local change, not a system property, - * so we can spare all our users the hassel of reacting on + * so we can spare all our users the hassle of reacting on * this in their respective DataChanged. */ - if( aOldSettings.GetMouseSettings().GetNoWheelActionWithoutFocus() ) - { - MouseSettings aSet( maSettings.GetMouseSettings() ); - aSet.SetNoWheelActionWithoutFocus( TRUE ); - maSettings.SetMouseSettings( aSet ); - } + MouseSettings aSet( maSettings.GetMouseSettings() ); + aSet.SetWheelBehavior( aOldSettings.GetMouseSettings().GetWheelBehavior() ); + maSettings.SetMouseSettings( aSet ); if( (nChangeFlags & SETTINGS_STYLE) && IsBackground() ) { |