Dirkster99 / AvalonDock

Our own development branch of the well known WPF document docking library
Microsoft Public License
1.39k stars 318 forks source link

Fix issue where content of floating window is set to inactive #466

Open mpondo opened 9 months ago

mpondo commented 9 months ago

We'd like to remove code that is setting the content of the floating window to inactive when the window becomes inactive.

This code was introduced in https://github.com/Dirkster99/AvalonDock/pull/410. The commit fixes an issue with activating the content, but it assumes that it should also deactivate the content. However, deactivating the content introduces new behavior. In our usage, this resulted in multiple issues, because we have child windows that popup and are no longer activating correctly because the parent floating window is no longer active.

To demonstrate the issue, I added a document with a button to open a simple message box to the TestApp. If you open the message box from a document docked in the main window, the document remains active (as shown by the blue tab and bar). However, when the document is in a floating window, opening the message box causes the document to become inactive. I would have expected the behavior to be th same in both cases.

Video of bug: AvalonDock-DeactivateWindow-Bug

Here is a video of the fix. It also validates that the new code maintains the behavior of the original fix from https://github.com/Dirkster99/AvalonDock/pull/410. AvalonDock-DeactivateWindow-Fix