summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-12-20 17:58:05 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-12-20 18:43:35 +0530
commitace646b20ee88fdca2780365039e90cb1542262b (patch)
tree5440a19ac66fe84999ff3ed9271e7fbc68facdf7 /desktop
parent8ab6440cf04c6d8412bf0f6850e6f12aee38966a (diff)
lokdialog: Use Application::Post{Mouse,Key}Event() to post to main thread
... instead of custom machinery there to post to main thread. This also now posts window key events to the main thread instead of processing them on the lok thread. Change-Id: Ided1efb3f237a1838fa50bb8d74752be714c3032
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 670032a18211..f87caa5b0787 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -73,6 +73,7 @@
#include <svx/ruler.hxx>
#include <svx/svxids.hrc>
#include <svx/ucsubset.hxx>
+#include <vcl/vclevent.hxx>
#include <vcl/svapp.hxx>
#include <unotools/resmgr.hxx>
#include <tools/fract.hxx>
@@ -2269,10 +2270,10 @@ static void doc_postWindowKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned n
switch (nType)
{
case LOK_KEYEVENT_KEYINPUT:
- pWindow->LOKKeyInput(aEvent);
+ Application::PostKeyEvent(VclEventId::WindowKeyInput, pWindow, &aEvent);
break;
case LOK_KEYEVENT_KEYUP:
- pWindow->LOKKeyUp(aEvent);
+ Application::PostKeyEvent(VclEventId::WindowKeyUp, pWindow, &aEvent);
break;
default:
assert(false);
@@ -2449,13 +2450,13 @@ static void doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned
switch (nType)
{
case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
- pWindow->LogicMouseButtonDown(aEvent);
+ Application::PostMouseEvent(VclEventId::WindowMouseButtonDown, pWindow, &aEvent);
break;
case LOK_MOUSEEVENT_MOUSEBUTTONUP:
- pWindow->LogicMouseButtonUp(aEvent);
+ Application::PostMouseEvent(VclEventId::WindowMouseButtonUp, pWindow, &aEvent);
break;
case LOK_MOUSEEVENT_MOUSEMOVE:
- pWindow->LogicMouseMove(aEvent);
+ Application::PostMouseEvent(VclEventId::WindowMouseMove, pWindow, &aEvent);
break;
default:
assert(false);