From a7ba5d1efbd9bcaa39d47d7752c0382bd220a42f Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 7 Feb 2012 16:40:40 +0000 Subject: [PATCH] forwarding mouse moved events to the view under the mouse, not the firstResponder git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/nonownedwnd.mm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index 229e744230..a11208f4ad 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -126,6 +126,20 @@ bool shouldHandleSelector(SEL selector) ((wxWidgetCocoaImpl*)cw->GetPeer())->DoHandleMouseEvent( event); handled = true; } + else if ( [event type] == NSMouseMoved ) + { + NSPoint nsPoint = [event locationInWindow]; + if ( [event window] != nil ) + nsPoint = [[event window] convertBaseToScreen:nsPoint]; + + wxPoint pt = wxFromNSPoint(NULL, nsPoint); + wxWindow* mw = ::wxFindWindowAtPoint(pt); + if ( mw ) + { + ((wxWidgetCocoaImpl*)mw->GetPeer())->DoHandleMouseEvent( event); + handled = true; + } + } } return handled; } -- 2.50.0