#include "wx/sysopt.h"
#endif
+#ifndef __DARWIN__
#include <ToolUtils.h>
+#endif
//For targeting OSX
#include "wx/mac/private.h"
return wxMacFindSubControl( toplevelWindow , location , rootControl , outPart ) ;
}
+
+#define NEW_CAPTURE_HANDLING 1
+
pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
{
wxTopLevelWindowMac* toplevelWindow = (wxTopLevelWindowMac*) data ;
wxWindow* currentMouseWindow = NULL ;
ControlRef control = NULL ;
+#if NEW_CAPTURE_HANDLING
+ if ( wxApp::s_captureWindow )
+ {
+ window = (WindowRef) wxApp::s_captureWindow->MacGetTopLevelWindowRef() ;
+ }
+#endif
+
if ( window )
{
QDGlobalToLocalPoint( UMAGetWindowPort(window ) , &windowMouseLocation ) ;
- if ( wxApp::s_captureWindow && wxApp::s_captureWindow->MacGetTopLevelWindowRef() == (WXWindow) window && windowPart == inContent )
+ if ( wxApp::s_captureWindow
+#if !NEW_CAPTURE_HANDLING
+ && wxApp::s_captureWindow->MacGetTopLevelWindowRef() == (WXWindow) window && windowPart == inContent
+#endif
+ )
{
currentMouseWindow = wxApp::s_captureWindow ;
}
{
wxSize sz = GetClientSize();
wxRegion rgn(0, 0, sz.x, sz.y);
- return SetShape(rgn);
+ if ( rgn.IsEmpty() )
+ return false ;
+ else
+ return SetShape(rgn);
}
// Make a copy of the region