rust-windowing / rust-windowing/winit
Setting position on startup does not work reliably on X11
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
This has been reported to Alacritty in https://github.com/jwilm/alacritty/issues/2561.
On X11, it seems like setting the startup mode after the window is show()n on an originally invisible window has some inconsistent behavior. I've tested this myself on i3.
When the window is created and set to fullscreen on window.get_current_monitor() right at startup, the window is fullscreened on the incorrect monitor.
Additionally, if the position is set right after show() too, the window is fullscreened on the incorrect monitor and when leaving fullscreen mode the position is not what it has been set to.
If set_fullscreen is manually called on a keyboard event at a later point in time, both of these work without any issue.
See https://github.com/rust-windowing/winit/issues/978#issuecomment-705223820.
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
Start by reproducing the startup fullscreen and positioning behavior on X11 with i3, comparing startup calls with a later keyboard-triggered fullscreen change. Use the linked Alacritty and winit issue discussion as context. Done means fullscreen startup targets the selected monitor and leaving fullscreen restores the configured position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100