summaryrefslogtreecommitdiff
path: root/eventMouseClick.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouseClick.go')
-rw-r--r--eventMouseClick.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/eventMouseClick.go b/eventMouseClick.go
index 4229964..03e7180 100644
--- a/eventMouseClick.go
+++ b/eventMouseClick.go
@@ -46,15 +46,27 @@ func doMouseClick(w int, h int) {
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.notify.menu.active {
+ log.Info("show notify menu here")
+ setNotifyMenuText("[X]")
+ me.notify.menu.active = false
+ } else {
+ log.Info("hide notify menu here")
+ setNotifyMenuText("[ ]")
+ me.notify.menu.active = true
+ }
+ return
+ }
+ if me.notify.clock.tk != nil && me.notify.clock.tk.gocuiSize.inRect(w, h) {
+ log.Log(GOCUI, "click() is the clock!")
if me.showHelp {
log.Info("show help")
showHelp()
- setNotifyMenuText("[X]")
} else {
log.Info("hide help")
hideHelp()
- setNotifyMenuText("[ ]")
}
+ return
}
return
}