summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-01-12 17:19:41 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2022-01-17 10:04:56 +0100
commit89a44f1a340e6d3fe63dbcc229f61f2aed157d65 (patch)
tree23c87cc3f51cf66d58a2b8a4ca7e1e2adecdcd3f
parentUpdate git submodules (diff)
downloadcore-89a44f1a340e6d3fe63dbcc229f61f2aed157d65.tar.gz
core-89a44f1a340e6d3fe63dbcc229f61f2aed157d65.zip
RTL: lok: handle mirrored mouse coordinates
Change-Id: Ib881b92f691e250f150db1d02c48dd465c622fb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128370 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--vcl/source/window/winproc.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 0341b7e469d5..5bc917e09f7f 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -275,6 +275,14 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
ImplFrameData* pWinFrameData = xWindow->ImplGetFrameData();
sal_uInt16 nOldCode = pWinFrameData->mnMouseCode;
+ if (comphelper::LibreOfficeKit::isActive() && AllSettings::GetLayoutRTL()
+ && xWindow->GetOutDev() && !xWindow->ImplIsAntiparallel())
+ {
+ xWindow->GetOutDev()->ReMirror(aMousePos);
+ nX = aMousePos.X();
+ nY = aMousePos.Y();
+ }
+
// we need a mousemove event, before we get a mousebuttondown or a
// mousebuttonup event
if ( (nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN) || (nSVEvent == MouseNotifyEvent::MOUSEBUTTONUP) )