Support mouse click through as otherwise clicking inside an inactive window causes us to lose the first mouse down, unlike with MSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -651,6 +651,13 @@ void wxOSX_mouseEvent(NSView* self, SEL _cmd, NSEvent *event)
|
|||||||
impl->mouseEvent(event, self, _cmd);
|
impl->mouseEvent(event, self, _cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL wxOSX_acceptsFirstMouse(NSView* self, SEL _cmd, NSEvent *event)
|
||||||
|
{
|
||||||
|
// This is needed to support click through, otherwise the first click on a window
|
||||||
|
// will not do anything unless it is the active window already.
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
void wxOSX_keyEvent(NSView* self, SEL _cmd, NSEvent *event)
|
void wxOSX_keyEvent(NSView* self, SEL _cmd, NSEvent *event)
|
||||||
{
|
{
|
||||||
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
|
||||||
@@ -1120,6 +1127,8 @@ void wxOSXCocoaClassAddWXMethods(Class c)
|
|||||||
wxOSX_CLASS_ADD_METHOD(c, @selector(rightMouseDragged:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
wxOSX_CLASS_ADD_METHOD(c, @selector(rightMouseDragged:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
||||||
wxOSX_CLASS_ADD_METHOD(c, @selector(otherMouseDragged:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
wxOSX_CLASS_ADD_METHOD(c, @selector(otherMouseDragged:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
||||||
|
|
||||||
|
wxOSX_CLASS_ADD_METHOD(c, @selector(acceptsFirstMouse:), (IMP) wxOSX_acceptsFirstMouse, "v@:@" )
|
||||||
|
|
||||||
wxOSX_CLASS_ADD_METHOD(c, @selector(scrollWheel:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
wxOSX_CLASS_ADD_METHOD(c, @selector(scrollWheel:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
||||||
wxOSX_CLASS_ADD_METHOD(c, @selector(mouseEntered:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
wxOSX_CLASS_ADD_METHOD(c, @selector(mouseEntered:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
||||||
wxOSX_CLASS_ADD_METHOD(c, @selector(mouseExited:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
wxOSX_CLASS_ADD_METHOD(c, @selector(mouseExited:), (IMP) wxOSX_mouseEvent, "v@:@" )
|
||||||
|
Reference in New Issue
Block a user