diff options
Diffstat (limited to 'mainCloudBox.go')
| -rw-r--r-- | mainCloudBox.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mainCloudBox.go b/mainCloudBox.go index 8109c96..973d510 100644 --- a/mainCloudBox.go +++ b/mainCloudBox.go @@ -239,12 +239,19 @@ func ShowVM() { name := Data.CurrentVM.Name log.Println("ShowVM() START Data.CurrentVM=", Data.CurrentVM) VMwin := ui.NewWindow("VM " + name, 500, 300, false) + + // create a 'fake' button entry for the mouse clicks + var newButtonMap ButtonMap + newButtonMap.Action = "WINDOW CLOSE" + newButtonMap.W = VMwin + Data.AllButtons = append(Data.AllButtons, newButtonMap) + VMwin.OnClosing(func(*ui.Window) bool { + mouseClick(&newButtonMap) return true }) ui.OnShouldQuit(func() bool { - VMwin.Destroy() - VMwin = nil + mouseClick(&newButtonMap) return true }) |
