diff options
| author | Jeff Carr <[email protected]> | 2023-04-26 21:36:56 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-26 21:36:56 -0500 |
| commit | 076b0e4077f3854f7c5e487e83cfd590d14e7aeb (patch) | |
| tree | 6fb05b18c1cb896b39dc359fa32ec6874fc8ac29 /toolkit/gocui/main.go | |
| parent | e3cf42f1da9ec0ed07a7f346a0ce9c9ff10295c1 (diff) | |
gocui: standard close
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/main.go')
| -rw-r--r-- | toolkit/gocui/main.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/toolkit/gocui/main.go b/toolkit/gocui/main.go index 4b66153..0dd2c0a 100644 --- a/toolkit/gocui/main.go +++ b/toolkit/gocui/main.go @@ -60,10 +60,17 @@ func catchActionChannel() { func Exit() { // TODO: what should actually happen here? + standardExit() +} + +func standardExit() { me.baseGui.Close() + outf.Close() + setOutput(os.Stdout) sendBackQuit() + sleep(.5) + exit() } - func sendBackQuit() { // send 'Quit' back to the program (?) var a toolkit.Action @@ -89,7 +96,5 @@ func main() { MouseMain() log(true, "MouseMain() closed") - me.baseGui.Close() - - sendBackQuit() + standardExit() } |
