]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/NSView.mm
just added a comment
[wxWidgets.git] / src / cocoa / NSView.mm
index 364fa030594906b1508ac51100ad67b02f055c17..72c68998689456aef19bd57569c14ca9492be65d 100644 (file)
@@ -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);