Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
Problem description:
Modal dialog on top of non-modal window sends main window to back. Ie, when we close a child window its Owner gets send back (we lost focus)
Actual behavior:
The parent window lost focus after closing a child window after closing a modal.
Expected behavior:
No matter if a modal dialog has been shown before, if a user closes a child window, the parent window should stay visible.
Minimal repro:
Here is the problem and some source code to reproduce: https://stackoverflow.com/questions/10757625/why-does-closing-the-last-child-window-minimize-its-parent-window
@lisberPontes Could you help me to check is it a same issue with https://github.com/dotnet/wpf/issues/2761
@lisberPontes Could you help me to check is it a same issue with #2761
Hi @lindexi , I'm afraid is not the same problem. I've restore a quick video showing the problem. Just to add some context about it:

@lisberPontes Thank you. And I also find this problem and I write a demo in wpf-issues/ChildWindows at master 路 dotnet-campus/wpf-issues
The MainWindow will lose focus when close the sub window in WPF.
Most helpful comment
Hi @lindexi , I'm afraid is not the same problem. I've restore a quick video showing the problem. Just to add some context about it: