Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix APPMOUSEFOCUS naming, update const values#3043

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Starbuck5 merged 2 commits intomainfromankith26-activeevent
Mar 16, 2022

Conversation

@ankith26
Copy link
Contributor

pygame1 compatibility fix PR. Events of typeACTIVEEVENT must have astate attribute which is one of the possible 3 states. These three states had different constant values in SDL1 and pygame2, and there was a misnamed constant. This PR is a quickfix for both these issues

Copy link
Contributor

@dr0iddr0id left a comment

Choose a reason for hiding this comment

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

LGTM (hopefully nobody is already using the wrong written APPFOCUSMOUSE constant!)

@ankith26
Copy link
ContributorAuthor

ankith26 commentedFeb 24, 2022
edited
Loading

This event is not really documented that well, so I doubt anyone noticed this issue before. Since this is a "legacy" event, I don't think this needs elaborate documentation, people should switch to using the newWINDOWEVENT API.
EDIT: Made commit to recommend this in the docs

@ankith26
Copy link
ContributorAuthor

force pushed to fix a merge conflict

@Starbuck5
Copy link
Contributor

Starbuck5 commentedMar 16, 2022
edited
Loading

How was there a misnamed constant? The compiler would've failed if there wasn't anything namedSDL_APPFOCUSMOUSE right?

Edit: Oh, I see them in pygame.h

Copy link
Contributor

@Starbuck5Starbuck5 left a comment

Choose a reason for hiding this comment

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

Thanks for this!

This seems very harmless, just patching up a potential hole for old code. Neither the incorrect or the correct name was documented, just that ACTIVEEVENT has a state attribute. And that's okay.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@dr0iddr0iddr0id approved these changes

@Starbuck5Starbuck5Starbuck5 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

bugCompatability (Pygame 2)Something that works in Pygame 1 but is broken in Pygame 2eventpygame.event

Projects

None yet

Milestone

2.1.3

Development

Successfully merging this pull request may close these issues.

4 participants

@ankith26@Starbuck5@dr0id

[8]ページ先頭

©2009-2025 Movatter.jp