This commit is contained in:
2025-03-07 16:54:08 -08:00
parent d31763e66f
commit c846fc5a15
11 changed files with 136 additions and 287 deletions

View File

@@ -57,11 +57,12 @@ final class CBMenuBarItem: NSObject, NSWindowDelegate {
return event
}
// On click and drag, the button should panel should desappear and
// un-highlight.
// On click and drag, the button should panel should desappear and un-highlight.
localDragEventMonitor = LocalEventMonitor(mask: [.leftMouseDragged, .keyDown]) { [weak self] event in
let modifiers = event.modifierFlags.rawValue
if let panel = self?.panel, panel.isKeyWindow {
if event.modifierFlags.contains(.command) && event.type == .leftMouseDragged {
if modsContains(keys: OSCmd, in: modifiers) && event.type == .leftMouseDragged {
self?.panel.resignKey()
}
}