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

Commit 71c4f677 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "ScreenDecor: Set touchable region in windows coordinate space" into pi-dev am: befd06af

am: da87a31e

Change-Id: I7f6226a2b329b791a76d540420e8a5c7a2521a21
parents 39e3d378 da87a31e
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -554,7 +554,18 @@ public class ScreenDecorations extends SystemUI implements Tunable {
                return null;
            }

            return mInfo.displayCutout.getBounds();
            View rootView = getRootView();
            Region cutoutBounds = mInfo.displayCutout.getBounds();

            // Transform to window's coordinate space
            rootView.getLocationOnScreen(mLocation);
            cutoutBounds.translate(-mLocation[0], -mLocation[1]);

            // Intersect with window's frame
            cutoutBounds.op(rootView.getLeft(), rootView.getTop(), rootView.getRight(),
                    rootView.getBottom(), Region.Op.INTERSECT);

            return cutoutBounds;
        }
    }
}