rust-windowing / rust-windowing/winit
Support `xdg-session-management-v1` for Window State and Position Restoration on Wayland
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Description
On Wayland, client applications cannot query or set absolute window positions. Consequently, Window::outer_position() returns NotSupportedError, and Window::set_outer_position() is a no-op. This makes it impossible for applications to restore a window’s position after recreating it, toggling its visibility, or restarting the process.
The staging xdg-session-management-v1 protocol addresses this by allowing compositors to persist and restore toplevel state. This state includes geometry (position, size), maximized/fullscreen states, virtual desktops, and activities.
To restore a window, the client must call restore_toplevel with its xdg_toplevel before the window is first mapped
Relevant platforms
Wayland
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; begin by locating the Wayland backend's window creation and mapping path, then read the staging xdg-session-management-v1 protocol. Support restoring a toplevel before its first map, with geometry and other persisted state available for restoration, and verify the behavior on Wayland.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100