Skip to content
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

windows: Allow canceling prompt with escape #22821

Conversation

CharlesChen0823
Copy link
Contributor

reference: TDF_ALLOW_DIALOG_CANCELLATION

enable escape for cancle prompt dialog

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 8, 2025
@maxdeviant maxdeviant changed the title windows: Enable escape for cancle prompt dialog windows: Allow canceling prompt with escape Jan 8, 2025
@JunkuiZhang
Copy link
Contributor

It seems that currently, on the main branch, the prompt window can be closed using the Esc key.

And the description of TDF_ALLOW_DIALOG_CANCELLATION states:

"Indicates that the dialog should be able to be closed using Alt-F4, Escape, and the title bar's close button even if no cancel button is specified in either the dwCommonButtons or pButtons members."

Does this match our situation?

@CharlesChen0823
Copy link
Contributor Author

when you delete file in project_panel, you cannot using escape to cancle the prompt

@CharlesChen0823

This comment was marked as resolved.

@JunkuiZhang
Copy link
Contributor

Hi @CharlesChen0823 , thanks for reporting and fixing this. And I found that the issue here is more complex than we thought, I opened a new PR for this #25391

JunkuiZhang added a commit that referenced this pull request Feb 22, 2025
Closes #22821

It turns out that on Windows, the `Cancel` button should **always** have
a button ID of `2`. Even if the button label is something like "Don't
Cancel", when the user presses the `Esc` key, Windows will still report
that the button with ID `2` was pressed.

Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants