diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-24 12:19:57 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-27 19:43:52 +0530 |
commit | 3c3e07b51fb09d09cfef54193f93b07304f4ccda (patch) | |
tree | 55c4098e959779c3dea62efc428902156192aeb8 /sd/source/ui/view/sdwindow.cxx | |
parent | 33acd925613117d98f8e2b1752fbd949860c792e (diff) |
lok: All mouse,key events async
custom posting of mouse,key events on main thread
This still bypasses vcl while keeping the processing of events on the
main thread which is what we want.
Change-Id: Ia7a6f5ef1ac546245715abe418d261b49df12d4c
Reviewed-on: https://gerrit.libreoffice.org/50274
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'sd/source/ui/view/sdwindow.cxx')
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 8d4a634c60de..b81249061b87 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -1014,6 +1014,45 @@ void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle) SfxLokHelper::notifyInvalidation(&rSfxViewShell, sRectangle); } +void Window::LogicMouseButtonDown(const MouseEvent& rMouseEvent) +{ + // When we're not doing tiled rendering, then positions must be passed as pixels. + assert(comphelper::LibreOfficeKit::isActive()); + + Point aPoint = GetPointerPosPixel(); + SetLastMousePos(rMouseEvent.GetPosPixel()); + + mpViewShell->MouseButtonDown(rMouseEvent, this); + + SetPointerPosPixel(aPoint); +} + +void Window::LogicMouseButtonUp(const MouseEvent& rMouseEvent) +{ + // When we're not doing tiled rendering, then positions must be passed as pixels. + assert(comphelper::LibreOfficeKit::isActive()); + + Point aPoint = GetPointerPosPixel(); + SetLastMousePos(rMouseEvent.GetPosPixel()); + + mpViewShell->MouseButtonUp(rMouseEvent, this); + + SetPointerPosPixel(aPoint); +} + +void Window::LogicMouseMove(const MouseEvent& rMouseEvent) +{ + // When we're not doing tiled rendering, then positions must be passed as pixels. + assert(comphelper::LibreOfficeKit::isActive()); + + Point aPoint = GetPointerPosPixel(); + SetLastMousePos(rMouseEvent.GetPosPixel()); + + mpViewShell->MouseMove(rMouseEvent, this); + + SetPointerPosPixel(aPoint); +} + FactoryFunction Window::GetUITestFactory() const { if (get_id() == "impress_win") |