summaryrefslogtreecommitdiff
path: root/eventMouseClick.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-03 18:36:50 -0600
committerJeff Carr <[email protected]>2025-03-03 18:36:50 -0600
commit046e6b4d6ce30302e155615d1e7b8004dd03e97d (patch)
tree14943498bc6acccf4e0f662fc7566d52ffe299e0 /eventMouseClick.go
parentefb5ede4b94110da1c674542ec087a6a1dceaa99 (diff)
mouse clicks work on libnotify menu
Diffstat (limited to 'eventMouseClick.go')
-rw-r--r--eventMouseClick.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index 4ef2114..4229964 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -42,7 +42,20 @@ func doMouseClick(w int, h int) {
win := findWindowUnderMouse()
if win == nil {
- log.Log(GOCUI, "click() nothing was at:", w, h)
+ log.Log(INFO, "click() nothing was at:", w, h)
+ log.Log(INFO, "click() check if", w, h, "is the libnotify menu")
+ if me.notify.menu.tk != nil && me.notify.menu.tk.gocuiSize.inRect(w, h) {
+ log.Log(GOCUI, "click() is libnotify menu!")
+ if me.showHelp {
+ log.Info("show help")
+ showHelp()
+ setNotifyMenuText("[X]")
+ } else {
+ log.Info("hide help")
+ hideHelp()
+ setNotifyMenuText("[ ]")
+ }
+ }
return
}
if !win.isWindowActive() {