v3/examples/spotlight/README.md
This example demonstrates how to create a Spotlight-like launcher window using the CollectionBehavior option on macOS.
MacWindowCollectionBehaviorCanJoinAllSpaces, the window is visible across all virtual desktopsMacWindowCollectionBehaviorFullScreenAuxiliary, the window can appear over fullscreen applicationsMacWindowLevelFloating keeps the window above other windowsActivationPolicyAccessory)go run .
Note: This example is macOS-specific due to the use of CollectionBehavior.
Behaviors can be combined using bitwise OR (|):
CollectionBehavior: application.MacWindowCollectionBehaviorCanJoinAllSpaces |
application.MacWindowCollectionBehaviorFullScreenAuxiliary,
These are bitmask values that can be combined:
Space behavior:
| Option | Description |
|---|---|
MacWindowCollectionBehaviorDefault | Uses FullScreenPrimary (default) |
MacWindowCollectionBehaviorCanJoinAllSpaces | Window appears on all Spaces |
MacWindowCollectionBehaviorMoveToActiveSpace | Moves to active Space when shown |
MacWindowCollectionBehaviorManaged | Default managed window behavior |
MacWindowCollectionBehaviorTransient | Temporary/transient window |
MacWindowCollectionBehaviorStationary | Stays stationary during Space switches |
Fullscreen behavior:
| Option | Description |
|---|---|
MacWindowCollectionBehaviorFullScreenPrimary | Can enter fullscreen mode |
MacWindowCollectionBehaviorFullScreenAuxiliary | Can overlay fullscreen apps |
MacWindowCollectionBehaviorFullScreenNone | Disables fullscreen |
MacWindowCollectionBehaviorFullScreenAllowsTiling | Allows side-by-side tiling |
| Platform | Status |
|---|---|
| Mac | Working |
| Windows | N/A (macOS-specific feature) |
| Linux | N/A (macOS-specific feature) |