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

Window position and size not restoring 2024.8 #411

Open
darienm opened this issue Jul 9, 2024 · 4 comments
Open

Window position and size not restoring 2024.8 #411

darienm opened this issue Jul 9, 2024 · 4 comments

Comments

@darienm
Copy link

darienm commented Jul 9, 2024

[I did not see an option to re-open the issue that claims this feature was implemented #391, so here is a new issue. Feel free to delete or merge or whatever is appropriate.]

Version 2024.8 MacOS does not return the window to the last used position or size. It's sometimes in a similar region on-screen (no longer centered) but not particularly near where it was last closed, which doesn't achieve the goal. Do you need more info? Primary screen is 3840x2160 and secondary screen is 2560x1600. (1) Window does not return to proper screen (2) Window seems to get smaller with each launch. (3) Window seems to disregard X,Y positions greater than around 1400x1400.

@casperstorm
Copy link
Member

casperstorm commented Jul 29, 2024

I have debugged this, and it seems like there are some strange things going on.
When setting the window.json to

{"position":{"x":1000.0,"y":500.0},"size":{"width":500.0,"height":500.0}}

I notice it gets overwritten right after launch with the following on Windows by a iced::window::Event::Moved and Resized event.

{"position":{"x":909.0909,"y":454.54544},"size":{"width":454.54544,"height":454.54544}}

This only happens on Windows though, on Mac it doesnt get replaced like on Windows - but it sometimes ends up in a strange position, like you describes. I don't think its a issue on Halloys end, but rather a issue with winit 🤔
@hecrj have you noticed or seen anything similar?

@smakkerlak
Copy link

smakkerlak commented Aug 1, 2024

Can confirm that this happens on windows. Today, starting Halloy looked like this, after working correctly for a while:
image

I assume that the x and y position is the apps top left corner, and it seems to be correctly placed - so from my perspective, only size seems to change somewhat randomly.

@casperstorm
Copy link
Member

casperstorm commented Aug 1, 2024

Confirmed its a upstream issue on winit. On Halloy we really don't do anything special other than capturing the move/resize events as can be seen here and then save them as json, as can be seen here.

I have to disable the feature until a fix has been made upstream and merged it to main.
I'll keep this issue open. Sorry for the troubles.

@sr-gi
Copy link

sr-gi commented Nov 4, 2024

I can confirm this happens on MacOS too. window.json gets re-written every time Halloy is opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants