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

Add guard code to prevent FreeDV Reporter window from being off screen on startup. #650

Merged
merged 3 commits into from
Jan 14, 2024

Conversation

tmiw
Copy link
Collaborator

@tmiw tmiw commented Jan 13, 2024

While helping a user get their FreeDV Reporter window back on screen, I noticed that the left and top properties for the window in the Registry were set to values close to UINT32_MAX. This PR adds additional guard logic to prevent FreeDV from loading invalid window X and Y positions on startup, thus ensuring that the window can be recovered without wiping the FreeDV configuration.

@barjac
Copy link

barjac commented Jan 14, 2024

I wondered about the jiggle workaround that you introduced some time ago for the main window positioning issue. If it was already at max h then using h + 1 on start appeared to cause an accumulating decrease in window height on one particular window manager between re-starts. I patched this locally to not touch w (which was not needed) and to only use h - 1.
Not sure if this relates to this issue, but it reminded me to mention it.

@tmiw
Copy link
Collaborator Author

tmiw commented Jan 14, 2024

I wondered about the jiggle workaround that you introduced some time ago for the main window positioning issue. If it was already at max h then using h + 1 on start appeared to cause an accumulating decrease in window height on one particular window manager between re-starts. I patched this locally to not touch w (which was not needed) and to only use h - 1. Not sure if this relates to this issue, but it reminded me to mention it.

It doesn't look like that happens in the FreeDV Reporter window but should be straightforward to do in another PR.

@tmiw tmiw merged commit 41111ed into master Jan 14, 2024
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.

2 participants