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

Commit 994e02f5 authored by Tomasz Mikolajewski's avatar Tomasz Mikolajewski Committed by android-build-merger
Browse files

Merge "Fix selecting with touch in multi-window." into nyc-dev am: fbd4b558

am: 8d17c6f2

* commit '8d17c6f2':
  Fix selecting with touch in multi-window.

Change-Id: I8ffb8b0bf84943b87d859250d737762d3415c618
parents 4b46826f 8d17c6f2
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -139,8 +139,10 @@ public abstract class DocumentHolder
            }

            // Do everything in global coordinates - it makes things simpler.
            Rect rect = new Rect();
            mSelectionHotspot.getGlobalVisibleRect(rect);
            int[] coords = new int[2];
            mSelectionHotspot.getLocationOnScreen(coords);
            Rect rect = new Rect(coords[0], coords[1], coords[0] + mSelectionHotspot.getWidth(),
                    coords[1] + mSelectionHotspot.getHeight());

            // If the tap occurred within the icon rect, consider it a selection.
            if (rect.contains((int) event.getRawX(), (int) event.getRawY())) {