Cleanup.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user