Skip to content

pygame.Window.get_info() #3494

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

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

Conversation

gresm
Copy link
Contributor

@gresm gresm commented Jun 9, 2025

Alternative to pygame.Window._handle (+extra).

@gresm gresm requested a review from a team as a code owner June 9, 2025 22:06
@damusss
Copy link
Member

damusss commented Jun 9, 2025

I don't particurly like this, because:

  • get_info does not describe what kind of info it is, and looks more important than the returned value
  • there are a lot of properties that are basically useless, and they are inconsistent between sdl2/sdl3. this dict-like api feels "old" as pointed out by starbuck in my PR
  • we are already having a hard time deciding if the window handle is worth it, whether all the many numbers are worth it would be even harder

@gresm
Copy link
Contributor Author

gresm commented Jun 9, 2025

@damusss That's completely understandable. Just note that this PR is more of "port pygame.display.get_wm_info", only that adding support for pygame.Window was trivial. The API is intentionally the same. Nonetheless, I'm open for suggestions.

IMHO, exposing window identifier is useful.

@gresm gresm force-pushed the window-get_info branch from 7c56ec7 to 5d43b34 Compare June 9, 2025 23:01
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