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:
		@@ -985,7 +985,9 @@ void wxOSX_mouseEvent(NSView* self, SEL _cmd, NSEvent *event)
 | 
			
		||||
    if (impl == NULL)
 | 
			
		||||
        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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user