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

Commit 6cf85afc authored by Andrii Kulian's avatar Andrii Kulian Committed by Android (Google) Code Review
Browse files

Merge "Reset pointer icon when view is not present" into nyc-dev

parents 82197c33 33c1bc58
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -4398,8 +4398,14 @@ public final class ViewRootImpl implements ViewParent,
    private boolean updatePointerIcon(MotionEvent event) {
        final float x = event.getX();
        final float y = event.getY();
        if (mView == null) {
            // E.g. click outside a popup to dismiss it
            Slog.d(mTag, "updatePointerIcon called after view was removed");
            return false;
        }
        if (x < 0 || x >= mView.getWidth() || y < 0 || y >= mView.getHeight()) {
            Slog.e(mTag, "updatePointerIcon called with position out of bounds");
            // E.g. when moving window divider with mouse
            Slog.d(mTag, "updatePointerIcon called with position out of bounds");
            return false;
        }
        final PointerIcon pointerIcon = mView.getPointerIcon(event, x, y);