diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index 145d2518b0..4b73f1e26a 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -784,8 +784,6 @@ void wxNonOwnedWindowCocoaImpl::GetSize( int &width, int &height ) const void wxNonOwnedWindowCocoaImpl::GetContentArea( int& left, int &top, int &width, int &height ) const { - NSRect outer = NSMakeRect(100,100,100,100); - NSRect content = [NSWindow contentRectForFrameRect:outer styleMask:[m_macWindow styleMask] ]; NSRect rect = [[m_macWindow contentView] frame]; left = (int)rect.origin.x; top = (int)rect.origin.y; diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index ea7f08edd0..aa32945eda 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -328,12 +328,9 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const wxSize sz = m_window->GetSize(); - int left = subrect != NULL ? subrect->x : 0 ; - int top = subrect != NULL ? subrect->y : 0 ; int width = subrect != NULL ? subrect->width : sz.x; int height = subrect != NULL ? subrect->height : sz.y ; - NSRect rect = NSMakeRect(left, top, width, height ); NSView* view = (NSView*) m_window->GetHandle(); [view lockFocus]; // we use this method as other methods force a repaint, and this method can be