From 55f25afb49995ae799d9a093ed4f14142d4a8691 Mon Sep 17 00:00:00 2001
From: Pietro Gagliardi <pietro10@mac.com>
Date: Mon, 11 Aug 2014 12:40:41 -0400
Subject: [PATCH] Removed TODOs about initial sizing of Windows and their
 Controls on Mac OS X; turns out we fixed that problem when we did our
 container NSView and overrode setFrameSize: :D

---
 redo/window_darwin.m | 24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/redo/window_darwin.m b/redo/window_darwin.m
index b58c2b8..21287cf 100644
--- a/redo/window_darwin.m
+++ b/redo/window_darwin.m
@@ -20,17 +20,6 @@
 	return windowClosing(self->gowin);
 }
 
-// TODO there has to be a better way
-- (void)doWindowResize:(id)win
-{
-	NSWindow *w;
-	NSRect r;
-
-	w = toNSWindow(win);
-	r = [[w contentView] frame];
-	[[w contentView] setFrameSize:r.size];
-}
-
 @end
 
 id newWindow(intptr_t width, intptr_t height)
@@ -78,8 +67,7 @@ void windowSetTitle(id win, const char * title)
 void windowShow(id win)
 {
 	[toNSWindow(win) makeKeyAndOrderFront:toNSWindow(win)];
-	// calling the above the first time won't emit a size changed event (unlike on Windows and GTK+), so fake one to get the controls laid out properly
-	windowRedraw(win);
+	// no need to worry about reshowing the window initially; that's handled by our container view (container_darwin.m)
 }
 
 void windowHide(id win)
@@ -96,13 +84,3 @@ id windowContentView(id win)
 {
 	return (id) [toNSWindow(win) contentView];
 }
-
-// fake a resize event under certain conditions; see each invocation for details
-void windowRedraw(id win)
-{
-	goWindowDelegate *d;
-
-	d = [toNSWindow(win) delegate];
-	[d doWindowResize:win];
-	// TODO new control sizes don't take effect properly, even with [toNSWindow(win) display];
-}