diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-12-15 02:50:56 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-12-15 02:50:56 (GMT) |
commit | c23b714ab089bf546c9cc37188f29274b4e4991a (patch) | |
tree | c0d8acf525b0ffd8ac7769cfc2eabccc1470bb8c /macosx/tkMacOSXSubwindows.c | |
parent | 66ba0bfddcbc40934af2383e187fc55d981902f4 (diff) | |
download | tk-c23b714ab089bf546c9cc37188f29274b4e4991a.zip tk-c23b714ab089bf546c9cc37188f29274b4e4991a.tar.gz tk-c23b714ab089bf546c9cc37188f29274b4e4991a.tar.bz2 |
Fix for some redraw issues on Tk-Cocoa on OS X 10.11; further refinement of memory management; thanks to Marc Culler for patches
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index d23ba85..f026318 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -131,11 +131,6 @@ XMapWindow( { MacDrawable *macWin = (MacDrawable *) window; XEvent event; - /* - * This function can be called from outside the AppKit event - * loop, so it needs its own AutoreleasePool. - */ - NSAutoreleasePool* pool = [NSAutoreleasePool new]; /* * Under certain situations it's possible for this function to be called @@ -158,6 +153,7 @@ XMapWindow( if ( [win canBecomeKeyWindow] ) { [win makeKeyAndOrderFront:NSApp]; } + /* Why do we need this? (It is used by Carbon)*/ [win windowRef]; TkMacOSXApplyWindowAttributes(macWin->winPtr, win); } @@ -194,7 +190,6 @@ XMapWindow( event.xvisibility.type = VisibilityNotify; event.xvisibility.state = VisibilityUnobscured; NotifyVisibility(macWin->winPtr, &event); - [pool drain]; } /* @@ -318,7 +313,6 @@ XResizeWindow( unsigned int height) { MacDrawable *macWin = (MacDrawable *) window; - NSAutoreleasePool *pool= [NSAutoreleasePool new]; display->request++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { NSWindow *w = macWin->winPtr->wmInfoPtr->window; @@ -333,7 +327,6 @@ XResizeWindow( } else { MoveResizeWindow(macWin); } - [pool drain]; } /* @@ -366,7 +359,6 @@ XMoveResizeWindow( display->request++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { NSWindow *w = macWin->winPtr->wmInfoPtr->window; - if (w) { NSRect r = NSMakeRect(x + macWin->winPtr->wmInfoPtr->xInParent, tkMacOSXZeroScreenHeight - (y + @@ -407,7 +399,6 @@ XMoveWindow( display->request++; if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) { NSWindow *w = macWin->winPtr->wmInfoPtr->window; - if (w) { [w setFrameTopLeftPoint:NSMakePoint(x, tkMacOSXZeroScreenHeight - y)]; } |