summaryrefslogtreecommitdiff
path: root/eventMouseClick.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-09 03:00:10 -0600
committerJeff Carr <[email protected]>2025-02-09 03:00:10 -0600
commit8d8fc22745e8e5497e3db0a3389c17c3030a230f (patch)
tree15c30353e6651217f37ab8e890099c6890d76d7a /eventMouseClick.go
parenteba5ea8cc072e950df19ad5b97e3c99794ab790e (diff)
detect an attempt to close a window
Diffstat (limited to 'eventMouseClick.go')
-rw-r--r--eventMouseClick.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index 88e37a3..3f907d9 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -166,7 +166,10 @@ func doMouseClick(w int, h int) {
// tk.dumpWidget("undef click()") // enable this to debug widget clicks
}
}
- log.Info("you clicked on a window, but not any widgets", win.cuiName)
+ if win.checkWindowClose(w, h) {
+ return
+ }
+ log.Info("you clicked on a window, but not any widgets. check for title / close window here", win.cuiName)
win.redrawWindow(win.gocuiSize.w0, win.gocuiSize.h0)
me.stdout.outputOnTop = false
setThingsOnTop()