diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-23 21:27:33 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-27 19:43:37 +0530 |
commit | f48c0d09990e9fa59d1d5f2d1d6e013feedb92d3 (patch) | |
tree | 72792ee82980371438cd2c9172a6bd05aa6d3ac8 /vcl | |
parent | fa80f03899a4c28b6abf0b4fa65e8e5c5e312b91 (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 ccf463a49c36..f073c9739a65 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> @@ -481,6 +484,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 ) |