Skip to content

Conversation

@ohowe1
Copy link
Contributor

@ohowe1 ohowe1 commented Aug 11, 2023

Currently, when closing the wpigui window when the file dialog is open, the file dialog will remain open. This also includes samhocevar/portable-file-dialogs#91 to properly retrieve the HWND on Windows.

PFD's kill function does not behave on Windows with a file dialog. I don't know enough about the windows api to fix this. With the HWND fix this is kind of a non-issue as Windows will not allow interacting with the wpigui window when the file dialog is open (but still not ideal, I'm sure). Because of the way that PFD creates file dialogs on Linux and macOS, the file dialog does not prohibit interaction with the wpigui window as is normal behavior in other applications. If we want to fix this we'd probably have to change to NFD or something similar doesn't create the file dialogs how PFD does.

@ohowe1 ohowe1 requested a review from a team as a code owner August 11, 2023 17:24
@ohowe1 ohowe1 changed the title Fix PFD file dialogs not closing after window closing [wpigui] Fix PFD file dialogs not closing after window closing Aug 11, 2023
};

class file_dialog : public dialog
class file_dialog : public internal::dialog
Copy link
Member

Choose a reason for hiding this comment

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

This change shouldn't be required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It isn't required, but I made the change for it to be consistent with the other dialog classes being explicit about the namespace

@PeterJohnson PeterJohnson merged commit e2e1b76 into wpilibsuite:main Aug 12, 2023
@ohowe1 ohowe1 deleted the pfd-window-fix branch August 12, 2023 18:27
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