rust-windowing / rust-windowing/winit

Remember last window position/size

Open
#941 8 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C - needs discussion DS - appkit DS - wayland DS - win32 DS - x11 S - api S - enhancement
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/669.

As far as I understand, it's common on macOS that applications remember their last position and size when restarted. It would be nice if this could be provided by winit.

Some problems I see with providing this in winit are related to multiple windows, I'm not sure if that might cause any problems.

If this is not something winit can handle, but consumers should handle instead, I'd be interested if there's any recommended way of going about it, since consumers have limited access to the window only. Maybe winit could make it easier for the consumer at least by providing some helper methods.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by examining winit's existing window-state API and macOS behavior, then determine how consumers and multiple windows would participate; done requires a decided approach for persisting and restoring position and size.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.