X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f83b67612b28807e9628c66a25b47f92bb95c4b3..be5a51fb592f3fa2ba38ac6cd1e488d6d806058c:/src/mac/carbon/toplevel.cpp?ds=sidebyside diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 64d7065dd5..2434341adf 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -372,7 +372,7 @@ ControlRef wxMacFindSubControl( Point location , ControlRef superControl , Contr ControlRef wxMacFindControlUnderMouse( Point location , WindowRef window , ControlPartCode *outPart ) { #if TARGET_API_MAC_OSX - if ( UMAGetSystemVersion() >= 1030 ) + if ( UMAGetSystemVersion() >= 0x1030 ) return FindControlUnderMouse( location , window , outPart ) ; #endif ControlRef rootControl = NULL ; @@ -394,6 +394,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev short windowPart = ::FindWindow(screenMouseLocation, &window); wxWindow* currentMouseWindow = NULL ; + if ( window ) { // calculate window relative coordinates