From 11c23c1f97eefd5f748469d4c88b8c67e95a93dd Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 7 Feb 2018 12:07:01 -0500 Subject: Exit by returning false from input to gf{b,cocoa} I haven't built gfb yet, so a fix commit is probably incoming. --- bin/gfcocoa.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin/gfcocoa.m') diff --git a/bin/gfcocoa.m b/bin/gfcocoa.m index 1839bcd0..ece79fb5 100644 --- a/bin/gfcocoa.m +++ b/bin/gfcocoa.m @@ -16,6 +16,7 @@ #import #import +#import #import #import #import @@ -25,7 +26,7 @@ extern int init(int argc, char *argv[]); extern const char *status(void); extern void draw(uint32_t *buf, size_t xres, size_t yres); -extern void input(char in); +extern bool input(char in); @interface BufferView : NSView { size_t bufSize; @@ -94,7 +95,9 @@ extern void input(char in); remainingRange: NULL ]; if (converted) { - input(in); + if (!input(in)) { + [NSApp terminate: self]; + } [self setWindowTitle]; [self draw]; } -- cgit 1.4.1