android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
 |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2dad7eb36753f9c84bfcc20c456e33104be06482
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Mar 19 17:53:38 2015 +0100

    android: when in selection, avoid showing the middle handle
    
    editeng sends LOK_CALLBACK_CURSOR_VISIBLE after the text selection is
    already created. The effect of this is that after a long push on a word
    you get not only the selection overlay + the start/end handles, but also
    the middle one, which is not expected. Just check if we're in a
    selection already, and if so, don't react to
    LOK_CALLBACK_CURSOR_VISIBLE=true.
    
    Change-Id: I939c957feb7889dfb1997fac1051cb4eaa77004c

diff --git 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
index e9110f6..805ed9c 100644
--- 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
+++ 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java
@@ -3,6 +3,7 @@ package org.libreoffice;
 import android.content.Intent;
 import android.graphics.RectF;
 import android.net.Uri;
+import android.util.Log;
 
 import org.libreoffice.kit.Document;
 import org.mozilla.gecko.TextSelection;
@@ -211,7 +212,9 @@ public class InvalidationHandler implements 
Document.MessageCallback {
     private synchronized void cursorVisibility(String payload) {
         if (payload.equals("true")) {
             mTextCursorLayer.showCursor();
-            mTextSelection.showHandle(TextSelectionHandle.HandleType.MIDDLE);
+            if (mState != OverlayState.SELECTION) {
+                
mTextSelection.showHandle(TextSelectionHandle.HandleType.MIDDLE);
+            }
         } else if (payload.equals("false")) {
             mTextCursorLayer.hideCursor();
             mTextSelection.hideHandle(TextSelectionHandle.HandleType.MIDDLE);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to