Skip to content

Application: Windows that let the pointer through #1380

Todo

Description

@oneo-me

Context

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

Reference: NSGo's #568; ignoresMouseEvents, WS_EX_LAYERED with WS_EX_TRANSPARENT, gdk_surface_set_input_region

Acceptance

  • desktop.SetWindowPointerEvents is checked by hand on macOS, a Windows 11 machine and Ubuntu under X11 and Wayland: with WindowPointerNone presses, wheel turns and hovers reach the window below; with WindowPointerPainted a 200 by 200 view in a 600 by 400 window takes presses, WindowDrag and OnContextMenu while presses around it reach the window below; and a switch takes effect without reopening the window. So far a macOS test checked the window's ignoresMouseEvents and the painted hit test, and Windows and Linux were only compiled; Windows's layered window over DirectComposition content is unchecked, in a material window and a plain one, through WindowPointerNone and back to WindowPointerAuto

For: 开发@柚子

Activity

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

    @houko
    Collaborator

    The macOS path is tested, while Windows and Linux pointer-through and painted hit-testing remain device/window-manager verification gaps. Leaving open.

  4. self-assigned this
    on Nov 24, 2026
  5. oneo-me commented on Nov 24, 2026

    @oneo-me
    CollaboratorAuthor

    Windows 11 verification, 2026-11-24, on main at 96d8b4533. The check is added in #2332.

    On a Windows 11 desktop (build 26300, interactive console session, scale 1.0), TestWindowPointerModesRouteTheSystemPointer opens a 600×400 window over another 600×400 window. It drives the real system pointer with SetCursorPos and mouse_event, so Windows routes every message and NSGo's hit test plays no part.

    • WindowPointerNone: presses inside and outside the island reach the lower window, as do hover (OnMouseEnter) and wheel. The upper window gets nothing.
    • WindowPointerPainted: the 200×200 island takes presses, hover, wheel and OnContextMenu (right button). A control inside its WindowDragOn strip keeps its press without moving the window. Dragging the strip moves the window. Presses, hover and wheel beside the island reach the lower window.
    • Back to WindowPointerAuto: the empty part of the upper window takes the press again, and the island does too.
    • Modes switch through SetWindowPointerEvents without replacing either HWND.
    • The composed screen still shows the island's color in every mode, so the layered window keeps drawing its DirectComposition content.

    The test runs a plain window and a Mica window (WindowMaterialMica, drawn through DirectComposition) as subtests. It passed 5 of 5 runs.

    NSGO_LIVE_POINTER=1 go tool nsgo test -run TestWindowPointerModesRouteTheSystemPointer ./internal/platform/windows

    Still unchecked:

    • macOS native routing. I didn't inject real pointer events into the Mac's active desktop.
    • Ubuntu under X11 and Wayland. The available Linux machine runs Hyprland, which has no pointer-injection tool installed. The private Openbox/X11 and Sway regressions remain the Linux coverage.

    🤖 Claude Opus 5.5

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