sbmpost / AutoRaise

AutoRaise (and focus) a window when hovering over it with the mouse
GNU General Public License v3.0
1.42k stars 60 forks source link

Autoraise only after minimize/close most front app #207

Open swenak opened 4 months ago

swenak commented 4 months ago

Hi,

what about to add option to autoraise only after customer press minimize/close button on most front window like in MS Windows systems?

Thanks.

sbmpost commented 4 months ago

@swenak

Interesting idea. Raise/focus only just after an application lost focus. I'm not sure if there is an OS event for this. This requires some investigation.

Related: #199

swenak commented 4 months ago

Maybe only after that buttons are pressed (if exist event for this), or only when mouse button press was on specified rectangle with that buttons in window.

sbmpost commented 4 months ago

@swenak

It seems there is a deactivated notification. However this is only called when AutoRaise (or the user) activates another window. Ideally, when minimizing a window, we also get the notification, but that is not happening. A quick look over the Apple APIs doesn't reveal notifications for app minimization. Individual applications can detect minimimization with the applicationDidChangeOcclusionState event, but this is not usable for AutoRaise.

swenak commented 4 months ago

So, maybe other solution, based on window numbers? Something like this: https://developer.apple.com/documentation/appkit/nswindow/1419210-windownumber