summaryrefslogtreecommitdiff
path: root/eventMouseClick.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-08 15:01:36 -0600
committerJeff Carr <[email protected]>2025-02-08 15:01:36 -0600
commit42eafb87c729da4ad980c79c9e344db79def9186 (patch)
tree45435c7a054cd6207ca03918853fe9b91b3d5633 /eventMouseClick.go
parentea544e429e1afbb60e91d2cba6caf85d8e08cc64 (diff)
dropdown works again
Diffstat (limited to 'eventMouseClick.go')
-rw-r--r--eventMouseClick.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index 67c877a..dcf394a 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -114,17 +114,19 @@ func doMouseClick(w int, h int) {
// handle an open dropdown menu or text entry window first
if me.dropdown.active || me.textbox.active {
// can't drag or do anything when dropdown or textbox are visible
- log.Info("can't do anything. dropdown or textbox is active")
for _, tk := range findByXY(w, h) {
if tk.node.WidgetId == me.dropdown.wId {
log.Info("got dropdwon click", w, h, tk.cuiName)
tk.dropdownClicked(w, h)
+ return
}
if tk.node.WidgetId == me.textbox.wId {
log.Info("got textbox click", w, h, tk.cuiName)
tk.textboxClosed()
+ return
}
}
+ log.Info("a dropdown or textbox is active. you can't click anywhere else (otherwise hit ESC)", w, h)
return
}
@@ -186,6 +188,12 @@ func doMouseDoubleClick(w int, h int) {
me.mouse.double = false
// log.Printf("actually a double click (%d,%d)", w, h)
+ if me.dropdown.active || me.textbox.active {
+ // can't drag or do anything when dropdown or textbox are visible
+ log.Info("can't double click. dropdown or textbox is active")
+ return
+ }
+
for _, tk := range findByXY(w, h) {
if tk.node.WidgetType == widget.Window {
tk.redrawWindow(tk.gocuiSize.w0, tk.gocuiSize.h0)