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
Test: Manual testing with apps listed in bugs. Automated tests to follow

Change-Id: Ie5165a608c3bc1dd9097693b631eb4834e8e681d
(cherry picked from commit d8848124d44ad9361060678720901a0844350a21)
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index e115fed..d2dfa76 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 @@
                 break;
             }
         }
+        cropRegionToStackBoundsIfNeeded(outRegion);
 
         if (forSurface) {
             if (mTouchableInsets != TOUCHABLE_INSETS_REGION) {