summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-08 08:55:26 -0600
committerJeff Carr <[email protected]>2025-02-08 08:55:26 -0600
commitb730ee945918587849ecc031ca6d84cf99d22415 (patch)
tree2a1342e267a1dfbaf013e142cd30b918204eaae4
parenta6c1864f439e16262d9587cbf3c024db07a2e316 (diff)
double click stdout to move to front or back
-rw-r--r--eventMouseClick.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index b3f817b..edf4562 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -146,4 +146,16 @@ func doMouseClick(w int, h int) {
func doMouseDoubleClick(w int, h int) {
me.mouse.double = false
log.Printf("actually a double click (%d,%d)", w, h)
+
+ for _, tk := range findByXY(w, h) {
+ if tk.node.WidgetType == widget.Stdout {
+ if me.stdout.outputOnTop {
+ me.stdout.outputOnTop = false
+ setThingsOnTop()
+ } else {
+ me.stdout.outputOnTop = true
+ setThingsOnTop()
+ }
+ }
+ }
}