Skip to content

Application: Panels beside a caret or the pointer #1377

Closed

Description

@oneo-me

Context

Part of #1306. The roadmap's Application and windows section lists this item (line 142 of docs/roadmap.md at f7fc2f5c) with no issue.

Reference: NSGo's #243

Acceptance

  • Window.ShowAt and Window.MoveTo place a panel beside a screen rectangle on macOS, Windows and X11, and PanelOptions.NoActivate keeps it from the keyboard there; what remains is a Wayland panel docked to a screen edge on a layer-shell surface (zwlr_layer_shell_v1) where the compositor has one, a public pointer location to place one at, nsgotest asserting a panel's frame and that showing it left the focus alone, and a check on a second monitor of another scale

For: 开发@柚子

Activity

  1. added
    enhancement
    on Nov 21, 2026
  2. self-assigned this
    on Nov 22, 2026
  3. houko commented on Nov 22, 2026

    @houko
    Collaborator

    Audit/update: the public pointer location API is already present as desktop.CursorPoint on macOS, Windows and X11 (unavailable on Wayland). Existing ShowAt/MoveTo placement remains in the native backends.

    PR #1999 adds the missing native observation API: nsgotest.Surface.WindowState() returns the actual window's frame, visibility and focus from its UI thread. It does not infer them from the app's commands. Native Linux Xvfb/Openbox acceptance verifies ShowAt, MoveTo, Focus, Hide and Toggle preserve placement and leave the original window's native focus intact; forcing NoActivate off in a negative control made that test fail when the panel took focus. Native Mac visibility passes. Six desktop architecture/test-host checks and model/API/layering/skill checks pass.

    The strict Mac focus test could not activate its app in the remote graphical session, and the mixed-scale-display fixture explicitly skips on the available single-scale displays. No Windows native focus or physical dual-monitor pass is claimed. CI now runs Linux native placement/focus and desktop visibility smoke tests.

    Keeping #1377 open. The next implementation scope is the explicit Wayland edge-docked layer-shell panel; mixed-scale native acceptance and the unavailable focus environments remain tracked. PR #1999 is open and unmerged.

  4. houko commented on Nov 22, 2026

    @houko
    Collaborator

    PR #2024 adds explicit PanelOptions.Dock / desktop.CanDockPanels for macOS, Windows, X11 and layer-shell Wayland compositors. Docking survives show/focus/tray toggles and content resizing; unavailable libraries/protocols/displays report placement errors instead of showing an ordinary Wayland toplevel.

    Native evidence:

    • Isolated Sway: all four edges on two real compositor outputs at scales 1 and 2, measured compositor PNG pixels, content growth/shrink, hide/show and real keyboard input retained by the original window. Changing the nonactivating keyboard mode to exclusive makes the regression fail; restoring it passes.
    • Isolated Xvfb/Openbox: native X11 edge frames and resizing passed three consecutive runs.
    • macOS: actual app-owned NSPanel frames, growth/shrink, reopening and non-key status passed, including after rebase.
    • Windows: full package compilation and both architecture checks pass. Initial diagnostics measured eight correct initial frames, but visibility/focus acceptance cannot be claimed: the available runner's service window station is invisible, and even an independent raw Win32 control with WS_VISIBLE set reports IsWindowVisible=false through its invisible desktop parent. The committed fixture skips on that independent control failure and retains strict assertions on a visible desktop.

    All six desktop target checks, core/driver/headless app tests, API/layering/skills, duplicate-backend and changelog checks pass. Physical mixed-scale display acceptance remains open.

    The public pointer query already exists as desktop.CursorPoint (bfd54b6), documented in the public desktop services guide, so that part of the original acceptance text is stale. The separate shared native window-observation API is in PR #1999. Keeping this issue open while the PRs and remaining native acceptance are outstanding; no PR was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions