From 3519723e7d9650abb2a83bda6cbf6f78a7bbf601 Mon Sep 17 00:00:00 2001 From: workani Date: Fri, 13 Nov 2026 00:25:13 +0100 Subject: [PATCH] Stop the menu from reopening after a click --- NetBar/NetBar/MenuBarView.swift | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/NetBar/NetBar/MenuBarView.swift b/NetBar/NetBar/MenuBarView.swift index af04863..cb686c1 100644 --- a/NetBar/NetBar/MenuBarView.swift +++ b/NetBar/NetBar/MenuBarView.swift @@ -156,14 +156,7 @@ class MenuBarView: NSView { } } - override func mouseDown(with event: NSEvent) { - // Pass click to the status item's button so the menu appears - super.mouseDown(with: event) - if let menu = self.enclosingMenuItem?.menu { - menu.popUp(positioning: nil, at: NSPoint.zero, in: self) - } else { - // Forward event if wrapped in NSStatusBarButton - self.nextResponder?.mouseDown(with: event) - } + override func hitTest(_ point: NSPoint) -> NSView? { + nil } }