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

Fix for special window close case under SDL #6489

Merged
merged 2 commits into from
Nov 14, 2018

Conversation

Jjagg
Copy link
Contributor

@Jjagg Jjagg commented Oct 8, 2018

Checks the window id so we only handle window events for the window we created. Also sets the exit flag when that window is closed. Fixes #6432.

@Jjagg
Copy link
Contributor Author

Jjagg commented Nov 14, 2018

@cra0zy This one's good to go IMO.

@@ -80,6 +80,8 @@ public override bool IsBorderless
}
}

internal uint Id;
Copy link
Member

Choose a reason for hiding this comment

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

The class is internal, so this should be public and next to other public variables.

Also use int? as we have no idea how SDL picks these ids, there is a very small chance that the dummy window we create sends events, and we probably don't want that.

@harry-cpp harry-cpp merged commit d955c33 into MonoGame:develop Nov 14, 2018
@tomspilman tomspilman changed the title Only handle MG window and exit when it's closed Fix for Window close under SDL Dec 8, 2018
@tomspilman tomspilman added this to the 3.7.1 Release milestone Dec 8, 2018
@tomspilman tomspilman changed the title Fix for Window close under SDL Fix for special window close case under SDL Dec 8, 2018
@Jjagg Jjagg deleted the sdl-weird-close branch December 13, 2018 15:45
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.

Game will not close using window close button (Unique Situation)
3 participants