MacOSWindowManager

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Bring the floating-level NSWindow to the front on the active Space. With moveToActiveSpace collection behavior, this physically moves the window. Also activates the application to ensure focus is gained.

Link copied to clipboard
fun canHideFromDock(): Boolean

Check if the application can be hidden from the Dock

Link copied to clipboard
fun hideFromDock(): Boolean

Set the application as accessory (no Dock icon, but can have a menu)

Link copied to clipboard

Check if any floating-level NSWindow is on the active Space. Uses NSApp.windows iteration (same fallback as setMoveToActiveSpace). Returns true if on active Space or if check fails (fail-open).

Link copied to clipboard
fun isOnActiveSpace(awtWindow: <Error class: unknown class>): Boolean

Check if an AWT window is currently on the active macOS Space. Returns true if on the active Space, false if on another Space. Returns true by default if the check cannot be performed (fail-open).

Link copied to clipboard
fun setMoveToActiveSpace(awtWindow: <Error class: unknown class>): Boolean

Configure an AWT window so that macOS moves it to the active Space when it is ordered front, instead of switching back to the Space where the window was originally created.

Link copied to clipboard
fun showInDock(): Boolean

Show the application in the Dock