X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa25b7f983548875e136c768f365e7ad913f8306..eea056232806fee37b8e00537b9ead8fe5cbdd19:/src/cocoa/window.mm diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 6b5c010532..3192fb8d58 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -380,6 +380,9 @@ wxWindow::~wxWindow() void wxWindowCocoa::CocoaAddChild(wxWindowCocoa *child) { + // Pool here due to lack of one during wx init phase + wxAutoNSAutoreleasePool pool; + NSView *childView = child->GetNSViewForSuperview(); wxASSERT(childView); @@ -666,6 +669,15 @@ bool wxWindowCocoa::Cocoa_resetCursorRects() return true; } +bool wxWindowCocoa::SetCursor(const wxCursor &cursor) +{ + if(!wxWindowBase::SetCursor(cursor)) + return false; + // Invalidate the cursor rects so the cursor will change + [[GetNSView() window] invalidateCursorRectsForView:GetNSView()]; + return true; +} + bool wxWindowCocoa::Cocoa_viewDidMoveToWindow() { wxLogTrace(wxTRACE_COCOA,wxT("wxWindow=%p::viewDidMoveToWindow"),this); @@ -1019,8 +1031,8 @@ void wxWindow::DoSetVirtualSize( int x, int y ) bool wxWindow::SetFont(const wxFont& font) { - // TODO - return true; + // FIXME: We may need to handle wx font inheritance. + return wxWindowBase::SetFont(font); } #if 0 // these are used when debugging the algorithm. @@ -1246,6 +1258,9 @@ void wxCocoaTrackingRectManager::StopSynthesizingEvents() void wxCocoaTrackingRectManager::BuildTrackingRect() { + // Pool here due to lack of one during wx init phase + wxAutoNSAutoreleasePool pool; + wxASSERT_MSG(!m_isTrackingRectActive, wxT("Tracking rect was not cleared")); if([m_window->GetNSView() window] != nil) {