diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-07-16 16:14:16 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-10-02 16:53:43 +0200 |
commit | f779609a9be63d70b895ba6f0d769e91b5321a2e (patch) | |
tree | 69ddb0ccff5e529101d60682118bb5cf593732cf /sfx2 | |
parent | f51d4014de0d2da352ac1773c6464933c4bac836 (diff) |
Ensure that 'input' events are processed asynchronously too.
Change-Id: I715eadd444e428148cfff8a61436987517004fae
Reviewed-on: https://gerrit.libreoffice.org/79882
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index f9c559093861..b7a4b238f18b 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -301,6 +301,7 @@ namespace VclEventId mnEvent; MouseEvent maMouseEvent; KeyEvent maKeyEvent; + OUString maText; }; void LOKPostAsyncEvent(void* pEv, void*) @@ -356,6 +357,10 @@ namespace case VclEventId::WindowMouseMove: pLOKEv->mpWindow->LogicMouseMove(pLOKEv->maMouseEvent); break; + case VclEventId::ExtTextInput: + case VclEventId::EndExtTextInput: + pLOKEv->mpWindow->PostExtTextInputEvent(pLOKEv->mnEvent, pLOKEv->maText); + break; default: assert(false); break; @@ -405,6 +410,27 @@ void SfxLokHelper::postKeyEventAsync(const VclPtr<vcl::Window> &xWindow, postEventAsync(pLOKEv); } +void SfxLokHelper::postExtTextEventAsync(const VclPtr<vcl::Window> &xWindow, + int nType, const OUString &rText) +{ + LOKAsyncEventData* pLOKEv = new LOKAsyncEventData; + switch (nType) + { + case LOK_EXT_TEXTINPUT: + pLOKEv->mnEvent = VclEventId::ExtTextInput; + pLOKEv->maText = rText; + break; + case LOK_EXT_TEXTINPUT_END: + pLOKEv->mnEvent = VclEventId::EndExtTextInput; + pLOKEv->maText = ""; + break; + default: + assert(false); + } + pLOKEv->mpWindow = xWindow; + postEventAsync(pLOKEv); +} + void SfxLokHelper::postMouseEventAsync(const VclPtr<vcl::Window> &xWindow, int nType, const Point &rPos, int nCount, MouseEventModifiers aModifiers, |