diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-23 09:35:18 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-23 19:06:10 +0200 |
commit | 510bca3d3ab0b2fd21f0083b4e0fe14ff8c903c3 (patch) | |
tree | 8e169c596fd97d23bca5435446011bdc92f8670f /sw | |
parent | 9d1c51265b419ea8e4084e2de30f740984380fa5 (diff) |
Simplify SwEditWin::LogicMouse* and sd::Window::LogicMouse*
These are intended to be called in LibreOfficeKit case. Setting pointer
position appeared in commits b780822f5afbf8cd6c2a8c756251a7edf248f55e
Author Miklos Vajna <vmiklos@collabora.co.uk>
Date Tue Feb 24 14:30:41 2015 +0100
Introduce SdXImpressDocument::postMouseEvent() override
and cc7d10c04fe3047f18b6d5271a5f46a31b80d360
Author Miklos Vajna <vmiklos@collabora.co.uk>
Date Tue Mar 03 12:09:04 2015 +0100
SwEditWin: disable map mode in LogicMouseButtonUp/Down
The only effect of Window::SetPointerPosPixel is realized by a call
to SalFrame::SetPointerPos; and in SVP case, which is used in case of
LibreOfficeKit on Linux, it is a noop (see SvpSalFrame::SetPointerPos
in vcl/headless/svpframe.cxx). But e.g. when running gtktiledviewer
on Windows, WinSalFrame::SetPointerPos is called, which actually sets
system cursor position, causing unexpected jumps.
And it is unclear why the mouse actions should restore previous mouse
positions after executing their functions in the first place. The other
overrides (vcl/source/control/ctrl.cxx, sc/source/ui/view/gridwin.cxx,
chart2/source/controller/main/ChartWindow.cxx) don't do that.
So remove these SetPointerPosPixel calls altogether.
The question remains: if these LogicMouse* are still needed, or if they
may be replaced with respective Window::Mouse* calls.
Change-Id: Id6103f8eaaddafc72fe5e4264532dbc8a658d240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141697
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 9b953b38c7cb..1c9d6cf4ef69 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -6651,12 +6651,8 @@ void SwEditWin::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()); - MouseButtonDown(rMouseEvent); - - SetPointerPosPixel(aPoint); } void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent) @@ -6664,12 +6660,8 @@ void SwEditWin::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()); - MouseButtonUp(rMouseEvent); - - SetPointerPosPixel(aPoint); } void SwEditWin::LogicMouseMove(const MouseEvent& rMouseEvent) @@ -6677,12 +6669,8 @@ void SwEditWin::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()); - MouseMove(rMouseEvent); - - SetPointerPosPixel(aPoint); } void SwEditWin::SetCursorTwipPosition(const Point& rPosition, bool bPoint, bool bClearMark) |