add event for composer to close the top window

This commit is contained in:
Vladimir Markelov 2017-06-30 15:25:29 -07:00
parent f677db2337
commit 4425b1bdb7
2 changed files with 4 additions and 0 deletions

View File

@ -584,6 +584,8 @@ func (c *Composer) processKey(ev Event) {
func ProcessEvent(ev Event) { func ProcessEvent(ev Event) {
switch ev.Type { switch ev.Type {
case EventCloseWindow:
comp.closeTopWindow()
case EventRedraw: case EventRedraw:
RefreshScreen() RefreshScreen()
case EventResize: case EventResize:

View File

@ -286,6 +286,8 @@ const (
EventDialogClose EventDialogClose
// Close application // Close application
EventQuit EventQuit
// Close top window - or application is there is only one window
EventCloseWindow
) )
// ConfirmationDialog and SelectDialog exit codes // ConfirmationDialog and SelectDialog exit codes