diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-07-07 18:00:36 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-07-08 11:32:03 +0200 |
commit | 4c6b204fdc0cba873d33d801a9853819c09bdc6e (patch) | |
tree | 142e37febe09ce89c68d23c2960d77cfb42a5c8a | |
parent | d67085cd86dc1e74941c8337d1eba39981117977 (diff) |
vcl: nerf Window::SetParentToDefaultWindow()
There is a problem with keyboard focus in an Eclipse RCP application on
WNT; it is apparently caused by re-parenting calling
ImplSalReCreateHWND() and that first transfers the focus to the newly
re-created window and when that dies shortly thereafter to the Eclipse
top-level window instead of LO child window.
Re-parenting doesn't work anyway because mpAppWin is always null outside
of unit tests and mpDefaultWin lives outside of time and space and
doesn't know about any window the LO window may be embedded in.
Re-parenting appears to be unnecessary because if a parent dies with
undisposed children that's considered a bug anyway nowadays.
(partially regression from 8a2f7704cd0e43304e54bf2281232335cc0979a3
which removed conditionals that limited the reparenting to floating
windows)
Change-Id: I7a3997d5e714b40918337207ec1387922f86f8e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118588
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | vcl/source/window/window.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index b399091bd201..fa029f89400f 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1785,7 +1785,7 @@ void Window::SetModalHierarchyHdl(const Link<bool, void>& rLink) void Window::SetParentToDefaultWindow() { Show(false); - SetParent(ImplGetDefaultWindow()); + // don't reparent: this window dies anyway and any children must have been disposed already } KeyIndicatorState Window::GetIndicatorState() const |