Don't send mouse events to disabled windows in wxOSX
Disabled controls are not supposed to accept any input, so don't send any mouse events to them. This fixes the behaviour of wxSlider which could be moved (and generated the corresponding events) even when it was disabled. Closes #17194.
This commit is contained in:
@@ -165,6 +165,7 @@ wxOSX:
|
|||||||
- Implement wxDataViewCtrl::SetRowHeight().
|
- Implement wxDataViewCtrl::SetRowHeight().
|
||||||
- Add OSXEnableAutomaticQuoteSubstitution(), OSXEnableAutomaticDashSubstitution()
|
- Add OSXEnableAutomaticQuoteSubstitution(), OSXEnableAutomaticDashSubstitution()
|
||||||
and OSXDisableAllSmartSubstitutions() to control wxTextCtrl smart behavior.
|
and OSXDisableAllSmartSubstitutions() to control wxTextCtrl smart behavior.
|
||||||
|
- Don't allow interacting with disabled wxSlider (Andreas Falkenhahn).
|
||||||
|
|
||||||
Unix:
|
Unix:
|
||||||
|
|
||||||
|
@@ -985,7 +985,9 @@ void wxOSX_mouseEvent(NSView* self, SEL _cmd, NSEvent *event)
|
|||||||
if (impl == NULL)
|
if (impl == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
impl->mouseEvent(event, self, _cmd);
|
// We shouldn't let disabled windows get mouse events.
|
||||||
|
if (impl->GetWXPeer()->IsEnabled())
|
||||||
|
impl->mouseEvent(event, self, _cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxOSX_cursorUpdate(NSView* self, SEL _cmd, NSEvent *event)
|
void wxOSX_cursorUpdate(NSView* self, SEL _cmd, NSEvent *event)
|
||||||
|
Reference in New Issue
Block a user