From: Stefan Csomor Date: Thu, 1 Apr 2004 15:19:39 +0000 (+0000) Subject: fixing shape windows, as we now use the structure region for answering questions... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b19bf058f3ea3f5d5c87f052bf40d4c994f31247 fixing shape windows, as we now use the structure region for answering questions about position and size, we cannot use GetRect in the defproc anymore git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 63b69a544e..9f15a883d9 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -406,7 +406,10 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev { ControlPartCode part ; ControlRef control = wxMacFindControlUnderMouse( windowMouseLocation , window , &part ) ; - currentMouseWindow = wxFindControlFromMacControl( control ) ; + if ( control == 0 ) + currentMouseWindow = (wxWindow*) data ; + else + currentMouseWindow = wxFindControlFromMacControl( control ) ; } } @@ -966,7 +969,7 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, // the frame window event handler InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ; MacInstallTopLevelWindowEventHandler() ; - + m_macFocus = NULL ; if ( HasFlag(wxFRAME_SHAPED) ) @@ -1213,8 +1216,9 @@ static void wxShapedMacWindowContentRegion(WindowRef window, RgnHandle rgn) wxTopLevelWindowMac* win = wxFindWinFromMacWindow(window); if (win) { - wxRect r = win->GetRect(); - SetRectRgn(rgn, r.GetLeft(), r.GetTop(), r.GetRight(), r.GetBottom()); + Rect r ; + wxShapedMacWindowGetPos(window, &r ) ; + RectRgn( rgn , &r ) ; } }