Input: Let WM compute touchable region 1/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: I906f1396ccc0c76f602a9903e696eedfc026f7c2
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 9e910a8..7b6709e 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -617,7 +617,7 @@
ssize_t removeChild(const sp<Layer>& layer);
sp<Layer> getParent() const { return mCurrentParent.promote(); }
bool hasParent() const { return getParent() != nullptr; }
- Rect computeScreenBounds() const;
+ Rect computeScreenBounds(bool reduceTransparentRegion = true) const;
bool setChildLayer(const sp<Layer>& childLayer, int32_t z);
bool setChildRelativeLayer(const sp<Layer>& childLayer,
const sp<IBinder>& relativeToHandle, int32_t relativeZ);