From 54bbe72aa8fe60c21e3bca46a5455a2965859c5b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 3 Mar 2025 22:56:05 -0600 Subject: SIGWINCH works on background and libnotify widgets --- eventMouseClick.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'eventMouseClick.go') 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 } -- cgit v1.2.3