ookii-dialogs / ookii-dialogs-wpf

Awesome dialogs for Windows Desktop applications built with Microsoft .NET (WPF)
BSD 3-Clause "New" or "Revised" License
1.14k stars 85 forks source link

Modal ProgressDialog: restore focus to owner #36

Closed FedeMiorelli closed 3 years ago

FedeMiorelli commented 3 years ago

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 commented 3 years ago

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

augustoproiete commented 3 years ago

@FedeMiorelli your changes have been merged, thanks for your contribution :+1:

FedeMiorelli commented 3 years ago

@augustoproiete thank you!

FedeMiorelli commented 3 years ago

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

augustoproiete commented 3 years ago

@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 commented 3 years ago

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

augustoproiete commented 3 years ago

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

The release is available on: