]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/nonownedwnd.cpp
Removed #include <typeinfo> (since C++ RTTI is no longer used)
[wxWidgets.git] / src / osx / carbon / nonownedwnd.cpp
index 7f0cbbdc9b720066ec75e1293b1dcf38be53827d..2fe95a95cc88da6294c08e90ff9372c38893d5fd 100644 (file)
@@ -837,19 +837,24 @@ wxNonOwnedWindowEventHandler(EventHandlerCallRef WXUNUSED(handler),
             if ( (attributes & kWindowBoundsChangeSizeChanged) || (attributes & kWindowBoundsChangeOriginChanged) )
             {
                 // all (Mac) rects are in content area coordinates, all wxRects in structure coordinates
             if ( (attributes & kWindowBoundsChangeSizeChanged) || (attributes & kWindowBoundsChangeOriginChanged) )
             {
                 // all (Mac) rects are in content area coordinates, all wxRects in structure coordinates
-                int left , top , right , bottom ;
-
-                toplevelWindow->GetNonOwnedPeer()->GetContentArea(left, top, right, bottom);
-
+                int left , top , width , height ;
+                // structure width
+                int swidth, sheight;
+
+                toplevelWindow->GetNonOwnedPeer()->GetContentArea(left, top, width, height);
+                toplevelWindow->GetNonOwnedPeer()->GetSize(swidth, sheight);
+                int deltawidth = swidth - width;
+                int deltaheight = sheight - height;
                 wxRect adjustR(
                     newRect.left - left,
                     newRect.top - top,
                 wxRect adjustR(
                     newRect.left - left,
                     newRect.top - top,
-                    newRect.right - newRect.left + left + right,
-                    newRect.bottom - newRect.top + top + bottom ) ;
+                    newRect.right - newRect.left + deltawidth,
+                    newRect.bottom - newRect.top + deltaheight ) ;
 
                 toplevelWindow->HandleResizing( cEvent.GetTicks(), &adjustR );
                 
 
                 toplevelWindow->HandleResizing( cEvent.GetTicks(), &adjustR );
                 
-                const Rect adjustedRect = { adjustR.y + top  , adjustR.x + left , adjustR.y + adjustR.height - bottom , adjustR.x + adjustR.width - right } ;
+                const Rect adjustedRect = { adjustR.y + top  , adjustR.x + left , adjustR.y + top + adjustR.height - deltaheight , 
+                    adjustR.x + left + adjustR.width - deltawidth } ;
                 if ( !EqualRect( &newRect , &adjustedRect ) )
                     cEvent.SetParameter<Rect>( kEventParamCurrentBounds , &adjustedRect ) ;
             }
                 if ( !EqualRect( &newRect , &adjustedRect ) )
                     cEvent.SetParameter<Rect>( kEventParamCurrentBounds , &adjustedRect ) ;
             }