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: fixed boolean errors in if conditions #1466

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AnyCPU
Copy link
Contributor

@AnyCPU AnyCPU commented Jan 29, 2025

affected functions: Window.ConstrainFrame and windowGeometrySaver.record.

Fixes #1465

@@ -257,7 +257,8 @@ func (ws *windowGeometrySaver) record(win *renderWindow) {
}
sc := win.SystemWindow.Screen()
pos := win.SystemWindow.Position(sc)
if TheApp.Platform() == system.Windows && pos.X == -32000 || pos.Y == -32000 { // windows badness
// TODO: come up with better name for a -32000 constant
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for this contribution! If you want, it would be great if you could add a system.WindowsMinimizedPosition constant or similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kkoreilly i've updated pr and added some new changes are supposed to make related code more logical and clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i can revert those changes and just use system.WindowsMinimizedPosition if any.

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.

Window.ConstrainFrame: boolean error in if condition
2 participants