summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-10-11 14:50:49 +0200
committerHenry Castro <hcastro@collabora.com>2022-02-18 17:16:39 +0100
commitc58c353d8c57aef62ec0a56c18918156ab7f84b7 (patch)
tree326de5afe111b67866b5890507c09d3a8a58c7fe
parentlok: send drag overlay (diff)
downloadcore-c58c353d8c57aef62ec0a56c18918156ab7f84b7.tar.gz
core-c58c353d8c57aef62ec0a56c18918156ab7f84b7.zip
lok: sc: focus gridwin before use
commit ef29f8c57dbb73ee3bd2e09ea557b86bf3eacfa6 lok: sc: update ScModelObj::postMouseEvent introduced Drag&drop for online. One missing thing was getting the focus for gridwin before mouse event processing like it is done in LOKPostAsyncEvent Change-Id: I4063340985f7dcc91cf5382631615119e28ea3f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123391 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129471 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--sc/source/ui/unoobj/docuno.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 33f5a7d617fa..14120753702a 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -757,6 +757,9 @@ void ScModelObj::postMouseEvent(int nType, int nX, int nY, int nCount, int nButt
if (LokControlHandler::postMouseEvent(pPage, pDrawView, *pGridWindow, nType, aPointHMMDraw, nCount, nButtons, nModifier))
return;
+ if (!pGridWindow->HasChildPathFocus(true))
+ pGridWindow->GrabFocus();
+
// Calc operates in pixels...
const Point aPosition(nX * pViewData->GetPPTX(), nY * pViewData->GetPPTY());
LokMouseEventData aMouseEventData(nType, aPosition, nCount, MouseEventModifiers::SIMPLECLICK,