diff --git a/composer.go b/composer.go index 103da88..1f49ca9 100644 --- a/composer.go +++ b/composer.go @@ -584,6 +584,8 @@ func (c *Composer) processKey(ev Event) { func ProcessEvent(ev Event) { switch ev.Type { + case EventCloseWindow: + comp.closeTopWindow() case EventRedraw: RefreshScreen() case EventResize: diff --git a/consts.go b/consts.go index 5fba693..daa5c37 100644 --- a/consts.go +++ b/consts.go @@ -286,6 +286,8 @@ const ( EventDialogClose // Close application EventQuit + // Close top window - or application is there is only one window + EventCloseWindow ) // ConfirmationDialog and SelectDialog exit codes