https://bugs.documentfoundation.org/show_bug.cgi?id=115315
--- Comment #11 from Michael Meeks <michael.me...@collabora.com> ---
The suggested revert is rather unclear to me =) but if it works I'm not against
it particularly; except the mbFrame thing is really not so clear to me as to
its purpose as distinct from having valid mpFrameData:
IMPL_LINK_NOARG(vcl::Window, ImplAsyncFocusHdl, void*, void)
{
ImplGetWindowImpl()->mpFrameData->mnFocusId = nullptr;
is what we remove - if this gets called on a disposed window - with no
ImplGetWindowImpl()->mpFrameData - and de-references that, we will crash hard.
It is hard to think how not calling ImplAsyncFocusHdl on a disposed window is
going to make life better generally for anything.
Clearly - there is some twisty horror in here; I suspect that perhaps having a
FocusToplevel - that does just this piece:
if ( !bHandled )
{
ImplSVData* pSVData = ImplGetSVData();
vcl::Window* pTopLevelWindow =
ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplGetFirstOverlapWindow();
if ((!pTopLevelWindow->IsInputEnabled() ||
pTopLevelWindow->IsInModalMode()) &&
!pSVData->maWinData.mpExecuteDialogs.empty())
pSVData->maWinData.mpExecuteDialogs.back()->ToTop(ToTopFlags::RestoreWhenMin |
ToTopFlags::GrabFocusOnly);
else
pTopLevelWindow->GrabFocus();
}
Might be better - to call in the case that we're being disposed with focus; but
... the whole behavior when shutting down is really not hyper-clear to me.
Ideally I guess the new window would call 'GrabFocus()' in some clear place on
as it starts; hmmm.
So - more thinking required than I have time for unfortunately just reviewing
the patch; sorry !
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs