I want to achieve a certain window behavior for a macOS app. I subclassed NSWindow
to be able to add additional properties. So far, it works well with almost all requirements (dragging it, clicking buttons) while preserving the core requirement of not making the currently active app losing focus. What does not work is making the window's UI elements react to mouse-hover events.
Requirements:
- ☑️ Don't activate the app when showing the window →
_setPreventsActivation:true
- ☑️ Prevent activation of the app when interacting with the window (click/drag) →
_setPreventsActivation:true
- ﹖Make the window react to mouse hover events over interactive UI elements without activating the app
An example of an application that does very much what I intend to do (UX-wise) is 1Password. Here is a short clip: An animated GIF showing 1Password UX
Can someone explain what they likely do to make their window behave this way?