How can I setup a callback to be triggered when the yellow window iconize/minimize button is clicked on OSX?
What I'm aiming for is to intercept the minimize button systemwide so that windows can be hidden (as in CMD-h) instead of iconized/minimized. For that I'd also need a hide-window method if such a function exists.
EDIT
Using the yellow minimize button in Mac applications causes the app to disappear. I have it set so that no extra icon is created in the dock (preference setting: 'Minimize windows into application icon'). When Alt-TAB is later used to restore the app, the window is not restored from the icon although the app itself does become active. This behavior is different from how CMD-h works. Although I have used a Mac for years I continually find the consequent uselessness of CMD-TAB irritating.