summaryrefslogtreecommitdiff
path: root/mainCloudBox.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-26 15:03:20 -0700
committerJeff Carr <[email protected]>2019-05-26 15:03:20 -0700
commit3bf115b56e75db0488a797f110c8717ff9a5a966 (patch)
treedc0c2b8b0f1a1c5a7043150df122a1db7db79189 /mainCloudBox.go
parent59629136af4b87dffc50d06144627a19fc5536e0 (diff)
open and close windows on linux for the VM
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'mainCloudBox.go')
-rw-r--r--mainCloudBox.go11
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
})