So I am working on a desktop overlay application that uses a tracking area to determine that the mouse enters and exits that area, then does something. Essentially I am building a rectangle that would know if the mouse hovered over it, and would change (an extremely basic rollover.)
The only tricky part is that I want this to be able to register these events whenever it is visible, even if it isn't firstresponder or key. The problem is that in order for it to register mouseEntered and mouseExited events, I have to first click on the window so that it becomes key, and then it registers them fine.
My question is, what would the best way to implement this be? I haven't been able to find a perfect solution yet, though I'm close.
The following link enables it to register CLICK events even if it's not focused, but I wasn't able to find something that would let it actually register mouseEntered and mouseExited.
Make OSX application respond to first mouse click when not focused