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

Fix focusloss of non-exclusive AcceptDialog with close_on_escape #78363

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

Sauermann
Copy link
Contributor

@Sauermann Sauermann commented Jun 17, 2023

Fix, that a non-exclusive AcceptDialog with close_on_escape == true gets closed, when the parent window of the parent window receives focus.

There is no need to rely on the focus of the parent visible window. Instead check if the AcceptDialog loses focus.

This is also a prerequisite for #72686

Tested:

  • Embedded windows
  • Linux X11
  • Windows

MRP: AcceptDialogFocus.zip

  1. Load and run MRP
  2. Click on the Button to create the AcceptDialog
  3. Click on the MainWindow

The AcceptDialog shoud now close, because it is non-exclusive and close_on_escape == true.
Current behavior is, that it doesn't close.

Alternative:
3. Click on the secondary window (now the AcceptDialog closes itself as expected)

Fix, that a non-exclusive AcceptDialog with `close_on_escape == true`
gets closed, when the parent window of the parent window receives focus.

There is no need to rely on the focus of the parent visible window.
Instead check if the AcceptDialog loses focus.
@Sauermann Sauermann requested a review from a team as a code owner June 17, 2023 09:10
@YeldhamDev YeldhamDev added this to the 4.1 milestone Jun 17, 2023
@akien-mga akien-mga merged commit e125af0 into godotengine:master Jun 18, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants