sfx2/source/view/lokhelper.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit ef025d623a90484674f1fe0fdf2dabce36d2aa8d Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Thu Mar 14 14:58:15 2019 +0100 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Fri Mar 15 09:53:52 2019 +0100 LOK: switch view before event emission if necessary. Unfortunately we still have large amounts of global state, and key event handling in some corners requires this in addition to the window. Change-Id: Id817030536f9cb45dbc39551dfb5332fc6998c62 Reviewed-on: https://gerrit.libreoffice.org/69269 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 4dbc5220ccea..85834534316c 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -241,6 +241,7 @@ namespace { struct LOKAsyncEventData { + int mnView; // Window is not enough. VclPtr<vcl::Window> mpWindow; VclEventId mnEvent; MouseEvent maMouseEvent; @@ -253,6 +254,13 @@ namespace if (pLOKEv->mpWindow->IsDisposed()) return; + int nView = SfxLokHelper::getView(nullptr); + if (nView != pLOKEv->mnView) + { + SAL_INFO("sfx.view", "LOK - view mismatch " << nView << " vs. " << pLOKEv->mnView); + SfxLokHelper::setView(pLOKEv->mnView); + } + switch (pLOKEv->mnEvent) { case VclEventId::WindowKeyInput: @@ -299,6 +307,7 @@ namespace return; } + pEvent->mnView = SfxLokHelper::getView(nullptr); Application::PostUserEvent(Link<void*, void>(pEvent, LOKPostAsyncEvent)); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits