summaryrefslogtreecommitdiff
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-24 09:45:39 +0100
commit74c80afa8544be52bce20b93aec982a3c64d233f (patch)
tree9a9dbc9b04abed949933e33658cdd8bfadd879cc
parentc13ec26f6a20bc9a0e3e4fd8f03d8f4e1d46c7d1 (diff)
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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128834 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.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 9c49f52894c5..e04eb9e7842b 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -281,6 +281,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->GetOutDev()->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) )