summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2018-02-23 21:27:33 +0530
committerAndras Timar <andras.timar@collabora.com>2018-03-25 23:02:11 +0200
commitf9222e2751b0ccd4f694fbbdd31150e40177eb2b (patch)
tree87561bec9a9ac7a8816c438ccda53d2fcdca53b7 /vcl
parent9a072927264fd5ab57aab958247df6cd50c641f6 (diff)
lok sc: Post mouse events to main thread
Reviewed-on: https://gerrit.libreoffice.org/50253 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit f48c0d09990e9fa59d1d5f2d1d6e013feedb92d3) Change-Id: I1311938d7c01d0e3bfd239743e6cb2148da56cdf
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/mouse.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 44b520dfe931..318133b8f163 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 )