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

Commit 76c4a129 authored by Jun Mukai's avatar Jun Mukai
Browse files

Do not update pointer icon shape for HOVER_EXIT event.

EXIT event does not have to udpate the pointer icon shape, because
when it immediately moves to another window, its HOVER_ENTER will
handle the icon shape.

Also HOVER_EXIT can happen after the HOVER_ENTER of the new window,
and in that case updating pointer icon at HOVER_EXIT will overwrite
the pointer icon for the new window.

Bug: 24415739
Change-Id: I08fc72cc69bbc3a6eef36d501d93e8e9ad36df85
parent 63afb863
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4182,7 +4182,8 @@ public final class ViewRootImpl implements ViewParent,

                final float x = event.getX();
                final float y = event.getY();
                if (x >= 0 && x < mView.getWidth() && y >= 0 && y < mView.getHeight()) {
                if (event.getActionMasked() != MotionEvent.ACTION_HOVER_EXIT
                        && x >= 0 && x < mView.getWidth() && y >= 0 && y < mView.getHeight()) {
                    int pointerShape = mView.getPointerShape(event, x, y);
                    if (pointerShape == PointerIcon.STYLE_NOT_SPECIFIED) {
                        pointerShape = PointerIcon.STYLE_DEFAULT;