X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5558135c4894ec39d39d46a3586df2bb0e89da09..d21423356ee013f6819f7b8b69cd2e662e15d44a:/src/cocoa/NSView.mm?ds=sidebyside diff --git a/src/cocoa/NSView.mm b/src/cocoa/NSView.mm index 364fa03059..72c6899868 100644 --- a/src/cocoa/NSView.mm +++ b/src/cocoa/NSView.mm @@ -79,6 +79,15 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView) WX_IMPLEMENT_POSER(wxPoserNSView); @implementation wxPoserNSView : NSView +- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent +{ + bool acceptsFirstMouse = false; + wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self); + if(!win || !win->Cocoa_acceptsFirstMouse(acceptsFirstMouse, theEvent)) + acceptsFirstMouse = [super acceptsFirstMouse:theEvent]; + return acceptsFirstMouse; +} + - (void)drawRect: (NSRect)rect { wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);