I have a button in a child window.
If I am working in the parent window (it is key), and I click once on the button in the child window, this click makes the child window key. I then have to click a second time to make the control (in this case, a button) respond.
How can I immediately respond to a click on that button in a non-key window?
This is controlled individually for each view class by
-[NSView acceptsFirstMouse:]which returnsNOby default. Subclasses have to returnYESto allow the first click to work.However,
NSButtonimplementation already returnsYESso it should work as is, unless your button is not painted byNSButtoninstance.