From 8d8fc22745e8e5497e3db0a3389c17c3030a230f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 9 Feb 2025 03:00:10 -0600 Subject: detect an attempt to close a window --- eventMouseClick.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'eventMouseClick.go') 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() -- cgit v1.2.3