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

Modal ProgressDialog: restore focus to owner #36

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

FedeMiorelli
Copy link
Contributor

When using a modal ProgressDialog (with ShowDialog()) the focus does not return to the owner window.
Additionally, when running under Wine emulation on Linux, the window becomes unresponsive as it remains in disabled state.
This patch restores the behavior by calling user32.dll EnableWindow on the owner handle.

Also solves issues like this:
https://stackoverflow.com/questions/21920645/ookii-dialogs-progressdialog-in-modal-style-doesnt-focus-owner-window-after-com

@augustoproiete
Copy link
Member

Grazie @FedeMiorelli looks good. I'll get this merged over the weekend.

@augustoproiete augustoproiete added the enhancement New feature or request label Feb 15, 2021
@augustoproiete augustoproiete added this to the 3.2.0 milestone Feb 15, 2021
When using a modal ProgressDialog (with ShowDialog()) the focus does not return to the owner window.
Additionally, when running under Wine emulation on Linux, the window becomes unresponsive as it remains in disabled state.
This patch restores the behavior by calling user32.dll EnableWindow on the owner handle
@augustoproiete
Copy link
Member

@FedeMiorelli your changes have been merged, thanks for your contribution 👍

@augustoproiete augustoproiete removed their request for review February 15, 2021 06:46
@FedeMiorelli
Copy link
Contributor Author

@augustoproiete thank you!

@FedeMiorelli
Copy link
Contributor Author

Hi @augustoproiete is a 3.2.0 release planned including this PR? Thanks

@augustoproiete
Copy link
Member

@FedeMiorelli Yes, this is what's included n 3.2.0: https://github.com/ookii-dialogs/ookii-dialogs-wpf/milestone/8

There's a couple of issues open there that I'd like to close before shipping 3.2.0 - let me know if you're blocked and I can easily ship a pre-release to NuGet with the latest commits in master

@FedeMiorelli
Copy link
Contributor Author

Hi @augustoproiete thanks for the kind offer, no rush on my end.. Cheers

Copy link
Member

@augustoproiete augustoproiete left a comment

Choose a reason for hiding this comment

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

LGTM

@augustoproiete
Copy link
Member

🎉 This issue has been resolved in Ookii.Dialogs.Wpf v4.0.0

The release is available on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

2 participants