Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle GetForegroundWindow() returning NULL. #28269

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

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 21, 2024

GetForegroundWindow() is documented as sometimes returning NULL (https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow), which is not a valid argument to PyCapsule_New. Use None to cover that case, instead.

Closes #28267 (in all likelihood...).

PR summary

PR checklist

GetForegroundWindow() is documented as sometimes returning NULL, which
is not a valid argument to PyCapsule_New.  Use None to cover that case,
instead.
@tacaswell tacaswell added this to the v3.9.1 milestone May 21, 2024
@QuLogic QuLogic merged commit 7157a19 into matplotlib:main May 21, 2024
48 of 50 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 21, 2024
@anntzer anntzer deleted the gfw branch May 21, 2024 18:36
timhoffm added a commit that referenced this pull request May 21, 2024
…269-on-v3.9.x

Backport PR #28269 on branch v3.9.x (Handle GetForegroundWindow() returning NULL.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants