summaryrefslogtreecommitdiff
path: root/libreofficekit/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-11 09:19:06 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-16 09:20:48 +0100
commit2f38b80b486015c1ddb219cf006c1705d2c43872 (patch)
tree990b99a447faa0b49c878794f70bba5937038033 /libreofficekit/source
parentf26dd84f6b99037c75364984bfca57369ae2095f (diff)
LOK: add LOK_SETTEXTSELECTION_RESET
So clients can perform a single method call to adjust the cursor position (when it's not a range), instead of sending two mouse clicks. This is mostly to be consistent, so that adjusting the cursor's middle and start/end handles all result in a setTextSelection() LOK call. Change-Id: I09eb0811887d173ea9ad7d125a2afb2c9e5c918c
Diffstat (limited to 'libreofficekit/source')
-rw-r--r--libreofficekit/source/gtk/lokdocview.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index 61d107ca568c..132b2d4c8770 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -74,8 +74,7 @@ gboolean lcl_signalMotion(GtkWidget* pEventBox, GdkEventButton* pEvent, LOKDocVi
{
g_info("lcl_signalMotion: dragging the middle handle");
lcl_getDragPoint(&pDocView->m_aHandleMiddleRect, pEvent, &aPoint);
- pDocView->pDocument->pClass->postMouseEvent(pDocView->pDocument, LOK_MOUSEEVENT_MOUSEBUTTONDOWN, pixelToTwip(aPoint.x), pixelToTwip(aPoint.y), 1);
- pDocView->pDocument->pClass->postMouseEvent(pDocView->pDocument, LOK_MOUSEEVENT_MOUSEBUTTONUP, pixelToTwip(aPoint.x), pixelToTwip(aPoint.y), 1);
+ pDocView->pDocument->pClass->setTextSelection(pDocView->pDocument, LOK_SETTEXTSELECTION_RESET, pixelToTwip(aPoint.x), pixelToTwip(aPoint.y));
}
else if (pDocView->m_bInDragStartHandle)
{