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
Linux: SetWindowLevel does nothing, so a floating window drops behind others (X11), with no way to tell on Wayland #573
desktop.SetWindowLevel says "on macOS and Windows; Linux leaves stacking to the compositor" (desktop/desktop.go:165-167). The Linux backend has no setLevel at all; macOS (internal/platform/macos/services.go:560) and Windows (internal/platform/windows/system.go:1215) do.
GTK 4 removed gtk_window_set_keep_above, so it needs the X11 surface directly: _NET_WM_STATE_ABOVE (and _NET_WM_STATE_BELOW for WindowLevelDesktop) through a _NET_WM_STATE client message on the GdkX11Surface.
On Wayland there is no core protocol for stacking or for placing a window, which core/window.go:250 and :291 already document for panels. wlr-layer-shell (wlroots compositors and KDE; GNOME does not implement it) is the usual route for always-on-top, positioned surfaces.
Why it matters
A floating window (a desktop pet, a timer, a HUD, a picture-in-picture player) silently does not float on Linux: WindowLevelFloating is accepted and ignored, so the window drops behind the next one the user clicks. The desktop pet "Big Blue Fish" (github.com/Bai-Cute/big-blue-fish-desktop-pet) has a Linux build that keeps its pet on top; NSGo cannot. On Wayland the pet also cannot walk along the screen edge, as SetWindowFrame cannot place it.
Proposal
X11: implement setLevel with _NET_WM_STATE_ABOVE / _NET_WM_STATE_BELOW, sent again when the window maps (window managers drop the state on unmapped windows).
Wayland: report the level and the frame as unavailable through Env (e.g. Env.CanSetWindowLevel, Env.CanPlaceWindows) so the app can tell the user or fall back, instead of ignoring them silently.
Optionally, a layer-shell surface on compositors that offer zwlr_layer_shell_v1, for windows that ask for the floating level and a fixed position.
Acceptance
On X11 under GNOME (Xorg) and KDE, a window with WindowLevelFloating stays above other windows after another window is clicked, and WindowLevelNormal puts it back.
On Wayland the app can read that stacking and placement are unavailable.
The SetWindowLevel doc names what each platform does.
Activity
feat(linux): set window levels on X11 and report window stacking and …