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]; -}