From 672efd5246dfb4ef28c5009ec6b0c680abbf0dba Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 20 Jul 2014 13:01:46 -0400 Subject: [PATCH] Implemented Window.Close() on Mac OS X, settling both that TODO and the one about making sure Window.Close() works as documented on all platforms. --- redo/window.go | 1 - redo/window_darwin.m | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/redo/window.go b/redo/window.go index b138a48..2bb3784 100644 --- a/redo/window.go +++ b/redo/window.go @@ -21,7 +21,6 @@ type Window interface { // Any Controls within the Window are destroyed, and the Window itself is also destroyed. // Attempting to use a Window after it has been closed results in undefined behavior. // Close unconditionally closes the Window; it neither raises OnClosing nor checks for a return from OnClosing. - // TODO make sure the above happens on Mac OS X; it does on Windows and GTK+ Close() // OnClosing registers an event handler that is triggered when the user clicks the Window's close button. diff --git a/redo/window_darwin.m b/redo/window_darwin.m index 71d4fae..ffa6110 100644 --- a/redo/window_darwin.m +++ b/redo/window_darwin.m @@ -81,5 +81,5 @@ void windowHide(id win) void windowClose(id win) { - // TODO + [toNSWindow(win) close]; }