Skip to content

[Feature] macOS: floating windows on every Space and over full-screen apps #572

Closed

Description

@houko

Context

Line numbers are at 4aea100 (main).

  • desktop.SetWindowLevel(WindowLevelFloating) on macOS only sets NSFloatingWindowLevel and clears the collection behaviours (internal/platform/macos/services.go:560-581). Only WindowLevelDesktop adds canJoinAllSpaces | stationary | ignoresCycle, and that level sits below every window.
  • So a floating window stays on the Space it opened on, disappears when the user switches Space, and is not shown over another app's full-screen Space (no fullScreenAuxiliary). Panels already get joinsAllSpaces | fullScreenAuxiliary (internal/platform/macos/app.go:167), but OpenWindow windows and the main window cannot.
  • NSH has WindowAttributes.workspaces with Workspaces::All (crates/nsh-core/src/desktop/window.rs:98-107), mapped to the collection behaviour in crates/nsh-platform-macos/src/window.rs:1015-1030.

Why it matters

Desktop pets, HUDs, timers, sticky notes and screen annotation tools are expected to follow the user across Spaces and to stay visible over a full-screen app, and usually to stay out of Cmd-Tab and Mission Control. The desktop pet "Big Blue Fish" (github.com/Bai-Cute/big-blue-fish-desktop-pet) does this on Windows, where a topmost window shows on every virtual desktop the user pins it to. On NSGo the pet vanishes as soon as the user swipes to another Space. Related: #567 (transparent windows), #568 (pointer through).

Proposal

type WindowWorkspaces uint8

const (
	WindowWorkspacesCurrent WindowWorkspaces = iota // the one it opened on (default)
	WindowWorkspacesAll                             // every Space / virtual desktop, and over full-screen apps on macOS
)

func SetWindowWorkspaces(cx *core.Scope, w WindowWorkspaces)

plus a WindowOptions field. macOS: canJoinAllSpaces | fullScreenAuxiliary (and ignoresCycle so it stays out of Cmd-cycling), kept whenSetWindowLevel changes the level instead of being cleared by it. Windows: pinning to all virtual desktops has no public API (IVirtualDesktopManageronly moves windows), so it reports unavailable unless a supported route exists. Linux X11:_NET_WM_DESKTOP = 0xFFFFFFFF`.

Acceptance

  • On macOS a floating window opened with WindowWorkspacesAll stays on screen while the user switches Spaces and over a full-screen app, and SetWindowLevel does not undo it.
  • WindowWorkspacesCurrent keeps today's behaviour.
  • Windows and Linux report what they support, and nsgotest records the value.

Activity

  1. added a commit that references this issue on Nov 17, 2026
    4e3c071
  2. added a commit that references this issue on Nov 19, 2026
    d53d9d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions