Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix the window getting smaller each time it's opened #413

Merged
merged 1 commit into from
May 13, 2023
Merged

Fix the window getting smaller each time it's opened #413

merged 1 commit into from
May 13, 2023

Conversation

Insprill
Copy link
Collaborator

When the window is created, there's an initial WindowSize event that's slightly smaller than the desired window size. This causes the app to keep getting smaller each time it's opened until it's hit the minimum window size. This makes it so the first WindowSize event doesn't save its size to the config.

@jacksongoode
Copy link
Collaborator

jacksongoode commented May 11, 2023

Wait why is it smaller than the expected size? What's actually causing the window to be smaller?
This seems relevant: linebender/druid#862

@jacksongoode
Copy link
Collaborator

Maybe this might have to do with the fact the window location is not being saved as well?

@Insprill
Copy link
Collaborator Author

I don't think it's due to the location not being saved. When the application starts, the saved size is correct. However, immediately after, it gets resized a little smaller. I thought maybe it was related to one size including the title bar and one size not, but that doesn't explain the width shrinking. I tried digging around in Druid to figure out where the resize event is even coming from, but I didn't have much luck.

Comment on lines +155 to +160
// This is a little hacky, but without it, the window will slowly get smaller each time the application is opened.
if !self.size_updated {
self.size_updated = true;
} else {
data.config.window_size = size;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to keep an issue related to this open so we can figure out a proper solution.

@arch-btw
Copy link
Contributor

@Insprill thanks for all the awesome commits lately!

@Insprill Insprill merged commit f94af14 into jpochyla:master May 13, 2023
@Insprill Insprill deleted the fix/window-size branch May 13, 2023 12:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants