diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-11 12:40:41 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-11 12:40:41 -0400 |
| commit | 55f25afb49995ae799d9a093ed4f14142d4a8691 (patch) | |
| tree | 3b88f1143df9c0d64195c3fe3ab6856c65f052cb | |
| parent | 61cd581ff4791e848435d87e47907c184f47298b (diff) | |
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
| -rw-r--r-- | redo/window_darwin.m | 24 |
1 files changed, 1 insertions, 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]; -} |
