X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa25b7f983548875e136c768f365e7ad913f8306..c4e1d0fc473f5213a2ea68a5eaa305f0a7164094:/src/cocoa/window.mm diff --git a/src/cocoa/window.mm b/src/cocoa/window.mm index 6b5c010532..2eaaafc97b 100644 --- a/src/cocoa/window.mm +++ b/src/cocoa/window.mm @@ -24,6 +24,7 @@ #include "wx/cocoa/string.h" #include "wx/cocoa/trackingrectmanager.h" +#import #import #include "wx/cocoa/objc/NSView.h" #import @@ -380,6 +381,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 +670,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 +1032,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 +1259,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) {