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
Remember windows size via pixel #1706
Conversation
& move parse_window_geometry
On first start up window opens in minimal possible size, after that everything works as intended. Tested on windows 10. |
This is expected, it's because it's reading the last saved character size and interpreting that as pixel size. |
Then everything is perfect been using it for a day with no issues :) |
Cargo.toml back to CRLF
3884cf7
to
600b117
Compare
Can you make sure that everything still works properly when the size has been stored as pixels, and then going to an older version of Neovide? There's this report #1788, and I'm fairly sure it's caused by this MR. Using a different name for the setting would probably be sufficient. |
4f9bc39
to
67850c7
Compare
@fredizzimo done and tested :) |
Is there anything that prevents this PR from being merged? It's been sitting here for a while now. |
as some one who has been using this patch for over 2 months on windows at least it is very solid. |
Same, I've been using this on Linux and haven't encountered a single problem so far. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the tiny comment about a use statement, everything looks good.
I have also been annoyed with the resizing myself, so I would personally really appreciate if this got merged.
src/settings/window_size.rs
Outdated
@@ -1,5 +1,6 @@ | |||
use std::path::PathBuf; | |||
|
|||
use glutin::dpi::PhysicalSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sould be winit::dpi::PyshicalSize
, since already changed all the other references. winit::dpi::PhysicalPosition
is also used just below this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
@MultisampledNight |
I would really prefer to have original |
@last-partizan The |
Oh, i missed that. I was thinking it was replaced. Looks good to me, then. @Kethku what do you think, should we merge this? |
https://neovide.dev/maintainer-cookbook.html#how-to-keep-your-sanity multisampled wrote this out and I think captures how us maintainers have needed to work on the project. We all have lives and jobs outside of it, and if we tried to track and respond to everything, we would burn out. At least thats how I personally see it. I personally haven't reviewed this yet because it wasn't clear to me if this is the better solution over storing a grid size. I think the growing window problem likely comes from a disconnect between the stored size which is maybe an internal window size without the frame, and the set size which maybe includes the frame. Or visa versa. Storing a pixel size might be worse if the window was stored on display with a given scaling factor and then restored in a window with a different factor? Idk. None of above should be a blocker, it was just some thoughts I had that weren't fully investigated. That lack of clarity on the "correct" solution stopped me personally from checking it off or reviewing. I don't have a strong feeling either way though and this likely improves things so maybe its worth merging. @chomosuke do you have some thoughts on what I've written above? If you're confident I'm over worried Im happy to merge. I appreciate the persistence <3 |
No worries @Kethku, I totally understand the maintaining a project like this is hard work and I thank you for everything you've already done for neovide! For the root cause of growing window I believe that it is caused by font size changing right after nvim starts, there's some further info on a comment I made a while ago and some evidence to support my beliefs. Overall storing the size in pixel has fixed the issue for me :). I'm not sure about changing scaling factor though, I haven't tested that but regardless I think this PR is still an improvement that fixes the changing font issue and I do think it is worth merging. Btw, if you think having more maintainer for this project will help, I am happy to be another maintainer. I have a few improvements to neovide in my mind and once I've made them I'd be more well versed in the code base and reviewing PR etc. |
Sold! You're probably right about the actual core issue as I had forgotten about the timing issue between reading the config and first window render. Thanks for the attention to detail. Maybe come hang out in the discord? That's where most of the maintainers are atm |
* Cargo.toml unix line ending * added --size * figure out initial size in draw_frame() * refactor: Rename window_geometry -> window_size & move parse_window_geometry * remember window size by pixel * updated doc * format * remove executable permission on random files * changed name of size setting to avoid conflict with old version of setting * Changed one glutin::dpi::PhysicalSize to winit
What kind of change does this PR introduce?
--size
cmd option.Did this PR introduce a breaking change?
A breaking change includes anything that breaks backwards compatibility either at compile or run time.