[Libreoffice-commits] core.git: sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Mar 15 16:09:41 UTC 2019
sfx2/source/view/lokhelper.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 645a33037116164eec7d2840a837d51f1f6abc5b
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Mar 14 14:58:15 2019 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Mar 15 17:09:15 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/69266
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 016ca841a263..768cedd9da44 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -243,6 +243,7 @@ namespace
{
struct LOKAsyncEventData
{
+ int mnView; // Window is not enough.
VclPtr<vcl::Window> mpWindow;
VclEventId mnEvent;
MouseEvent maMouseEvent;
@@ -255,6 +256,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:
@@ -301,6 +309,7 @@ namespace
return;
}
+ pEvent->mnView = SfxLokHelper::getView(nullptr);
Application::PostUserEvent(Link<void*, void>(pEvent, LOKPostAsyncEvent));
}
}
More information about the Libreoffice-commits
mailing list