[6000.1] Make sure tooltip window handle is being destroyed when parent window/control is destroyed #2110
+50
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Inside Systems.Windows.Forms various dialogs and views use and create Tooltip window. The tooltip window is special in a way that is never added to the controls of the window which created the tooltip resulting in never being destroyed with the main window. After the tooltip window is used and domain reload happens, focusing on a newly created main window can result in a crash as the tooltip's registered class object no longer exists in memory.
This PR adds two things:
The fix is applied to the following classes instantiating the tooltip:
datagridview
internalwindowmanager
filedialog
tabcontrol
statusbar
listview
toolstriptextbox
toolstrip
toolbar
treeview
Fix is not applied to the following classes instantiating tooltip as there is no obvious or guaranteed owner:
helpprovider
errorprovider
Should this pull request have release notes?
Do these changes need to be back ported?
Do these changes need to be upstreamed to mono/mono or dotnet/runtime repositories?
Reviewers: please consider these questions as well! ❤️
Release notes
Fixed UUM-79065 @zorana.curkovic
Mono: Prevent the crash on domain reload when Windows Form is using a tooltip window.
6000.0
2022.3
2021.3