nsbox

Why does my clickable box needs a double click to have a clickcount that is equal to 1?

冷暖自知 提交于 2019-12-12 04:01:36
问题 I have an NSStatusItem that has an NSMenuItem which contains a custom NSView. this NSView contains 3 Subviews of NSBox which are clickable (implemented the mouseDown event). Strangely, when I run the application and I enter the statusItem right after I pressed the 'Play'-Button I have to click the NSBox just one time (this returns clickCount = 1). When I enter another window or view and I go back to the statusItem and I try to click one of the NSBoxes nothing happens. When I double click the