Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Ignore window size when minimized #2153

Merged
merged 3 commits into from Dec 1, 2023

Conversation

fredizzimo
Copy link
Member

@fredizzimo fredizzimo commented Nov 29, 2023

What kind of change does this PR introduce?

Some platforms report a zero window size when minimized, so ignore that when saving the window size and resizing the Neovide grid.

Also enforce a minimum and maximum window size when restoring a saved size. This ensures that a window with a zero size is not displayed.

Fixes

Fixes partially:

It also fixes the annoying issue that the window layout changes when the window is minimized and then restored again.

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • Yes, windows sizes less than 300x150 or bigger than 8192x8192 can't be saved.

This ensures that no zero size windows are created for example, which
might be very hard or impossible to find on the desktop.
@fredizzimo fredizzimo linked an issue Nov 29, 2023 that may be closed by this pull request
@Kethku
Copy link
Member

Kethku commented Nov 30, 2023

Hell yes. That bug around window size changing has been driving me up a wall. LGTM. Merge when ready

src/settings/window_size.rs Outdated Show resolved Hide resolved
@fredizzimo fredizzimo merged commit 6ccc333 into neovide:main Dec 1, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

neovide resizes to 0 by 0 pixels [Windows 11]
2 participants