void wxWindowCocoa::CocoaRemoveFromParent(void)
{
- wxASSERT(m_cocoaNSView);
if(m_dummyNSView)
{
+ wxASSERT(m_cocoaNSView);
// balances the alloc
[m_dummyNSView removeFromSuperview];
// But since we also retained it ourselves
// But since we also retained it ourselves
[m_dummyNSView release];
m_dummyNSView = nil;
- return true;
}
else
{
// NOTE: replaceSubView will cause m_cocaNSView to be released
[[m_cocoaNSView superview] replaceSubview:m_cocoaNSView with:m_dummyNSView];
// m_coocaNSView is now only retained by us
- return true;
}
+ m_isShown = show;
+ return true;
}
void wxWindowCocoa::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
wxLogDebug("wxWindow=%p::DoMoveWindow(%d,%d,%d,%d)",this,x,y,width,height);
- NSView *superview = [m_cocoaNSView superview];
+ NSView *nsview = m_dummyNSView?m_dummyNSView:m_cocoaNSView;
+ NSView *superview = [nsview superview];
wxCHECK_RET(superview,"NSView does not have a superview");
NSRect parentRect = [superview frame];
void wxWindow::DoGetPosition(int *x, int *y) const
{
- NSView *superview = [m_cocoaNSView superview];
+ NSView *nsview = m_dummyNSView?m_dummyNSView:m_cocoaNSView;
+ NSView *superview = [nsview superview];
wxCHECK_RET(superview,"NSView does not have a superview");
NSRect parentRect = [superview frame];
- NSRect cocoaRect = [m_cocoaNSView frame];
+ NSRect cocoaRect = [nsview frame];
if(x)
*x=(int)cocoaRect.origin.x;
if(y)