MacOutsideClickWatcher

class MacOutsideClickWatcher(windowSupplier: () -> Window?, onOutsideClick: () -> Unit) : AutoCloseable

MacOutsideClickWatcher: encapsulates macOS-specific logic to detect a left-click outside the provided window and invoke a callback to hide it. It also ignores clicks on the macOS status bar tray icon (status item) so that clicking the tray icon does not spuriously hide the window.

Constructors

Link copied to clipboard
constructor(windowSupplier: () -> Window?, onOutsideClick: () -> Unit)

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()