diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-23 21:27:33 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-02-23 20:47:56 +0100 |
commit | 7e8d9f156fc6650c49c3312f6f7a7a57abf1f285 (patch) | |
tree | e4b33f90473d7d49e9025d54e39fba1f771910a8 /vcl | |
parent | 0178d2b7071be32ac2334e0548beae3b4e8dbc7d (diff) |
lok sc: Post mouse events to main thread
Change-Id: I1311938d7c01d0e3bfd239743e6cb2148da56cdf
Reviewed-on: https://gerrit.libreoffice.org/50253
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/mouse.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 467bc089e388..2a9ec9765c29 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -22,6 +22,9 @@ #include <tools/time.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> + +#include <vcl/ITiledRenderable.hxx> #include <vcl/svapp.hxx> #include <vcl/salgtype.hxx> #include <vcl/window.hxx> @@ -495,6 +498,20 @@ void Window::SetPointer( const Pointer& rPointer ) // possibly immediately move pointer if ( !mpWindowImpl->mpFrameData->mbInMouseMove && ImplTestMousePointerSet() ) mpWindowImpl->mpFrame->SetPointer( ImplGetMousePointer() ); + + if (VclPtr<vcl::Window> pWin = GetParentWithLOKNotifier()) + { + Pointer aPointer = GetPointer(); + // We don't map all possible pointers hence we need a default + OString aPointerString = "default"; + auto aIt = vcl::gaLOKPointerMap.find(aPointer.GetStyle()); + if (aIt != vcl::gaLOKPointerMap.end()) + { + aPointerString = aIt->second; + } + + pWin->GetLOKNotifier()->libreOfficeKitViewCallback(LOK_CALLBACK_MOUSE_POINTER, aPointerString.getStr()); + } } void Window::EnableChildPointerOverwrite( bool bOverwrite ) |