diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-27 14:03:34 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-27 19:46:49 +0530 |
commit | 54a8c0e115b24d42f4b4ec6b8194f5b62e08201b (patch) | |
tree | 035dfadb27ef34fad36b79ed370876847d97603d /vcl | |
parent | 3c3e07b51fb09d09cfef54193f93b07304f4ccda (diff) |
lok: mouse pointer events on document windows only
Change-Id: Ie21db52b2dd0d4f55289896caba5174380316e65
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/window.h | 1 | ||||
-rw-r--r-- | vcl/source/window/mouse.cxx | 9 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/vcl/inc/window.h b/vcl/inc/window.h index a0f158f8d559..648143e96545 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -384,6 +384,7 @@ public: const vcl::ILibreOfficeKitNotifier* mpLOKNotifier; ///< To emit the LOK callbacks eg. for dialog tunneling. vcl::LOKWindowId mnLOKWindowId; ///< ID of this specific window. + bool mbLOKParentNotifier; }; /// Sets up the buffer to have settings matching the window, and restores the original state in the dtor. diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index f073c9739a65..2804bc1ceb54 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -496,7 +496,14 @@ void Window::SetPointer( const Pointer& rPointer ) aPointerString = aIt->second; } - pWin->GetLOKNotifier()->libreOfficeKitViewCallback(LOK_CALLBACK_MOUSE_POINTER, aPointerString.getStr()); + // issue mouse pointer events only for document windows + // Doc windows' immediate parent SfxFrameViewWindow_Impl is the one with + // parent notifier set during initialization + if (GetParent()->ImplGetWindowImpl()->mbLOKParentNotifier && + GetParent()->ImplGetWindowImpl()->mnLOKWindowId == 0) + { + pWin->GetLOKNotifier()->libreOfficeKitViewCallback(LOK_CALLBACK_MOUSE_POINTER, aPointerString.getStr()); + } } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 5571e74a4cea..a7c50c793969 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -741,6 +741,7 @@ WindowImpl::WindowImpl( WindowType nType ) mbDoubleBufferingRequested = bDoubleBuffer; // when we are not sure, assume it cannot do double-buffering via RenderContext mpLOKNotifier = nullptr; mnLOKWindowId = 0; + mbLOKParentNotifier = false; } WindowImpl::~WindowImpl() @@ -3221,6 +3222,8 @@ void Window::SetLOKNotifier(const vcl::ILibreOfficeKitNotifier* pNotifier, bool mpWindowImpl->mnLOKWindowId = sLastLOKWindowId++; GetLOKWindowsMap().insert(std::map<vcl::LOKWindowId, VclPtr<vcl::Window>>::value_type(mpWindowImpl->mnLOKWindowId, this)); } + else + mpWindowImpl->mbLOKParentNotifier = true; mpWindowImpl->mpLOKNotifier = pNotifier; } |