From b924632173bf07cae09ce98561f77f8e12f9e704 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Thu, 6 Dec 2018 13:54:02 -0800 Subject: [PATCH] Input: Let WM compute touchable region 2/2 - For modal windows let WM define the touchable region. This fixes a regression introduced by ag/5700485 where input was sent to background windows. - When calculating input surface position, ignore the transparent region so that we do not incorrectly offset the input. This fixes and issue with input offset in AutoDesk drawing app. Bug: 120615996, 120612739, 120585467, 120604247 Test: Manual testing with apps listed in bugs. Automated tests to follow Change-Id: Ie5165a608c3bc1dd9097693b631eb4834e8e681d --- services/core/java/com/android/server/wm/WindowState.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index e115fed4db9a8..d2dfa76d7b34d 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -2836,6 +2836,7 @@ class WindowState extends WindowContainer implements WindowManagerP break; } } + cropRegionToStackBoundsIfNeeded(outRegion); if (forSurface) { if (mTouchableInsets != TOUCHABLE_INSETS_REGION) {