X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d449cf47c341df0d7ed66cbcdee38a00f6cc8aa3..5a618a14c627c87a2ea642bd8395b74d72e614ba:/src/cocoa/window.mm diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 554fdf65b4..31c729fcca 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -116,6 +116,15 @@ void wxWindowCocoa::SetNSView(WX_NSView cocoaNSView) if(need_debug) wxLogDebug("wxWindowCocoa=%p::SetNSView [cocoaNSView=%p retainCount]=%d",this,cocoaNSView,[cocoaNSView retainCount]); } +bool wxWindowCocoa::Cocoa_drawRect(const NSRect &rect) +{ + wxLogDebug("Cocoa_drawRect"); + //FIXME: should probably turn that rect into the update region + wxPaintEvent event(m_windowId); + event.SetEventObject(this); + return GetEventHandler()->ProcessEvent(event); +} + void wxWindowCocoa::Cocoa_FrameChanged(void) { wxLogDebug("Cocoa_FrameChanged"); @@ -148,7 +157,6 @@ bool wxWindow::Show(bool show) // But since we also retained it ourselves [m_dummyNSView release]; m_dummyNSView = nil; - return true; } else { @@ -157,8 +165,9 @@ bool wxWindow::Show(bool show) // 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)