Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b611213e authored by Leon Scroggins's avatar Leon Scroggins
Browse files

Stop the blinking caret when moving to another field.

Bug:2930013

Requires a change in external/webkit.

Change-Id: Ie768efd02da0afe317c0f93e32148ceb5516a1ec
parent d90ce9b4
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -8022,18 +8022,17 @@ public class WebView extends AbsoluteLayout
    /*
    /*
     * Send a mouse move event to the webcore thread.
     * Send a mouse move event to the webcore thread.
     *
     *
     * @param removeFocus Pass true if the "mouse" cursor is now over a node
     * @param removeFocus Pass true to remove the WebTextView, if present.
     *                    which wants key events, but it is not the focus. This
     * @param stopPaintingCaret Stop drawing the blinking caret if true.
     *                    will make the visual appear as though nothing is in
     *                    focus.  Remove the WebTextView, if present, and stop
     *                    drawing the blinking caret.
     * called by JNI
     * called by JNI
     */
     */
    private void sendMoveMouseIfLatest(boolean removeFocus) {
    @SuppressWarnings("unused")
    private void sendMoveMouseIfLatest(boolean removeFocus, boolean stopPaintingCaret) {
        if (removeFocus) {
        if (removeFocus) {
            clearTextEntry();
            clearTextEntry();
        }
        }
        mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE_IF_LATEST,
        mWebViewCore.sendMessage(EventHub.SET_MOVE_MOUSE_IF_LATEST,
                stopPaintingCaret ? 1 : 0, 0,
                cursorData());
                cursorData());
    }
    }


+4 −1
Original line number Original line Diff line number Diff line
@@ -558,7 +558,7 @@ final class WebViewCore {
    private native String nativeRetrieveHref(int x, int y);
    private native String nativeRetrieveHref(int x, int y);
    private native String nativeRetrieveAnchorText(int x, int y);
    private native String nativeRetrieveAnchorText(int x, int y);
    private native String nativeRetrieveImageSource(int x, int y);
    private native String nativeRetrieveImageSource(int x, int y);

    private native void nativeStopPaintingCaret();
    private native void nativeTouchUp(int touchGeneration,
    private native void nativeTouchUp(int touchGeneration,
            int framePtr, int nodePtr, int x, int y);
            int framePtr, int nodePtr, int x, int y);


@@ -1381,6 +1381,9 @@ final class WebViewCore {
                            nativeMoveMouseIfLatest(cData.mMoveGeneration,
                            nativeMoveMouseIfLatest(cData.mMoveGeneration,
                                    cData.mFrame,
                                    cData.mFrame,
                                    cData.mX, cData.mY);
                                    cData.mX, cData.mY);
                            if (msg.arg1 == 1) {
                                nativeStopPaintingCaret();
                            }
                            break;
                            break;


                        case REQUEST_CURSOR_HREF: {
                        case REQUEST_CURSOR_HREF: {