Skip to content

Add CascadeWindows wrapper#1999

Merged
mhammond merged 4 commits intomhammond:mainfrom
CristiFati:cfati_dev00
Jan 4, 2023
Merged

Add CascadeWindows wrapper#1999
mhammond merged 4 commits intomhammond:mainfrom
CristiFati:cfati_dev00

Conversation

@CristiFati
Copy link
Copy Markdown
Contributor

@CristiFati
Copy link
Copy Markdown
Contributor Author

Most likely, tests failed because machine is down.

@CristiFati CristiFati closed this Jan 2, 2023
@CristiFati CristiFati reopened this Jan 2, 2023
Copy link
Copy Markdown
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

Thanks - I think we need that null check - and do you mind adding something to CHANGES.txt?

Comment thread win32/src/win32gui.i
if (PyTuple_Check(childrenObject)) {
childCount = (UINT)(PyTuple_GET_SIZE(childrenObject));
if (childCount) {
children = (HWND*)(malloc(sizeof(HWND) * childCount));
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

should null-check here?

Comment thread win32/src/win32gui.i
DWORD gle = GetLastError();
if (gle) {
PyWin_SetAPIError("CascadeWindows", gle);
return NULL;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I assume it is intentional that zero will be returned if GetLastError() returns zero, rather than an exception? (The docs on the api function aren't really that clear) - but maybe a comment makes sense?

@CristiFati CristiFati requested a review from mhammond January 3, 2023 09:22
Copy link
Copy Markdown
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

Thanks!

@mhammond mhammond merged commit 603bcaa into mhammond:main Jan 4, 2023
@CristiFati
Copy link
Copy Markdown
Contributor Author

Hi @mhammond: Not related to this PR, but I couldn't find a better channel to ask.

There's [PyPI]: pypiwin32. I know that (at this point) it's old and outdated, but was it ever useful for someone / something?

To me it looks just like a playground, the "universal" variant seems to just have this as a dependency.

If it doesn't bring any value, is there a chance it could be removed?

@mhammond
Copy link
Copy Markdown
Owner

It existed before pywin32 itself supported being packaged as a wheel. I don't think it has much current value, but presumably there are still things out there that depend on it? TBH, I can't even recall who created it as I guess that's who we should ask (but know it wasn't me!)

@CristiFati CristiFati deleted the cfati_dev00 branch February 4, 2023 16: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