You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wayland: toplevel fallback for overlays without layer-shell (GNOME) #20
Overlays on Wayland use layer-shell. GNOME (Mutter) doesn't implement zwlr_layer_shell_v1, so an overlay HUD doesn't show at all there.
Needed: when layer-shell isn't available, fall back to an undecorated, transparent xdg toplevel for overlays, as close as the protocol allows (no input region outside the content, no taskbar entry where possible, best-effort placement, since toplevels can't position themselves). Report through the existing capability queries which features are degraded (placement, always-on-top, click-through), so apps can adapt.
Done when: an overlay example shows on GNOME Wayland, and the capability report says what's missing.
Update: this one got fixed as part of PR #29 (commit "GNOME overlay fallback; single-instance token/show path").
When no layer-shell binds (verified on nested Mutter: no zwlr_layer_shell_v1 in globals), Overlay::prepare() now falls back to an undecorated xdg toplevel window and reports what's degraded through the existing OverlayCapabilities:
i.e. placement / always-on-top / click-through are best-effort on the fallback path, and the app can read exactly that from the capabilities report instead of going Unavailable as before.
Verified: overlay-lab with OVERLAY_LAB_SECONDS + OVERLAY_LAB_PICKER=1 on mutter-46 nested (mutter --nested --wayland-display=qa-gnome): process stays up, the window path is taken, the report above is printed. Screenshots are thin on nested Mutter (no stable screencast path there), so pixel proof is the X11 scrot of the same overlay-lab pill (pill_crop_new.png, windowed_overlay.png crops in the PR body) plus the wl_snap headless snaps.
Toplevel fallback. An undecorated, transparent xdg toplevel for the cases that currently get no surface: no XWayland, KeyPolicy::OnDemand, or pointer input without the XWayland opt-in. It would keep the input region to the content, skip the taskbar where possible and place itself best-effort.
Capability report.OverlayCapabilities only has capture_exclusion, nonactivating_keys and global_pointer. It needs a way to say that placement, always-on-top and click-through are degraded. OverlayCapabilities isn't one of the types apps build as literals, but any new fields should still keep existing matches compiling.
I've opened a change for this. When neither layer-shell nor XWayland can be used, an overlay on Wayland now falls back to an undecorated, transparent xdg toplevel. That covers the cases that used to end Unavailable: no XWayland, KeyPolicy::OnDemand, or pointer input without xwayland_input. The toplevel carries the app's id, so the dock groups it with the app. It's destroyed on hide, and it takes either no input or input over its whole surface.
OverlayCapabilities gains placement, always_on_top and click_through. They're Supported on every other backend. On the toplevel, placement and always_on_top are Unsupported, and so is click_through under OverlayInput::Regions. The compositor may also focus the toplevel when it appears.
The unit tests pass, but no overlay has been seen on GNOME Wayland yet. The "Done when" check, a manual overlay-lab run on GNOME, is still open.
Activity
ImBIOS commentedon Oct 26, 2026
Update: this one got fixed as part of PR #29 (commit "GNOME overlay fallback; single-instance token/show path").
When no layer-shell binds (verified on nested Mutter: no
zwlr_layer_shell_v1in globals),Overlay::prepare()now falls back to an undecorated xdg toplevel window and reports what's degraded through the existingOverlayCapabilities:i.e. placement / always-on-top / click-through are best-effort on the fallback path, and the app can read exactly that from the capabilities report instead of going
Unavailableas before.Verified:
overlay-labwithOVERLAY_LAB_SECONDS+OVERLAY_LAB_PICKER=1on mutter-46 nested (mutter --nested --wayland-display=qa-gnome): process stays up, the window path is taken, the report above is printed. Screenshots are thin on nested Mutter (no stable screencast path there), so pixel proof is the X11scrotof the sameoverlay-labpill (pill_crop_new.png,windowed_overlay.pngcrops in the PR body) plus thewl_snapheadless snaps.GNOME overlay fallback; single-instance token/show path
GNOME overlay fallback; single-instance token/show path
opencodejr commentedon Nov 25, 2026
Thanks, this is still open. Current state on
dev:overlay/lifetime.rs→overlay/xwayland.rs). That covers overlays that take no input, and pointer overlays when the host setsOverlayOptions::xwayland_input(Linux/GNOME Wayland: support interactive XWayland overlays (meeting capsules / Annotate) #85).What's still missing:
KeyPolicy::OnDemand, or pointer input without the XWayland opt-in. It would keep the input region to the content, skip the taskbar where possible and place itself best-effort.OverlayCapabilitiesonly hascapture_exclusion,nonactivating_keysandglobal_pointer. It needs a way to say that placement, always-on-top and click-through are degraded.OverlayCapabilitiesisn't one of the types apps build as literals, but any new fields should still keep existing matches compiling.I'll look at making this change.
feat(overlay): Wayland toplevel fallback without layer-shell or XWayl…
opencodejr commentedon Nov 25, 2026
I've opened a change for this. When neither layer-shell nor XWayland can be used, an overlay on Wayland now falls back to an undecorated, transparent xdg toplevel. That covers the cases that used to end
Unavailable: no XWayland,KeyPolicy::OnDemand, or pointer input withoutxwayland_input. The toplevel carries the app's id, so the dock groups it with the app. It's destroyed on hide, and it takes either no input or input over its whole surface.OverlayCapabilitiesgainsplacement,always_on_topandclick_through. They'reSupportedon every other backend. On the toplevel,placementandalways_on_topareUnsupported, and so isclick_throughunderOverlayInput::Regions. The compositor may also focus the toplevel when it appears.The unit tests pass, but no overlay has been seen on GNOME Wayland yet. The "Done when" check, a manual
overlay-labrun on GNOME, is still open.Fixed in #2197.
feat(overlay): Wayland toplevel fallback without layer-shell or XWayl…