diff options
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index d628995276..91be71e390 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -293,8 +293,10 @@ static FloatRect reduce(const FloatRect& win, const Region& exclude) { return Region(Rect{win}).subtract(exclude).getBounds().toFloatRect(); } -Rect Layer::computeScreenBounds() const { - FloatRect bounds = computeBounds(); +Rect Layer::computeScreenBounds(bool reduceTransparentRegion) const { + const State& s(getDrawingState()); + Region transparentRegion = reduceTransparentRegion ? getActiveTransparentRegion(s) : Region(); + FloatRect bounds = computeBounds(transparentRegion); ui::Transform t = getTransform(); // Transform to screen space. bounds = t.transform(bounds); @@ -2155,7 +2157,6 @@ InputWindowInfo Layer::fillInputInfo(const Rect& screenBounds) { // Position the touchable region relative to frame screen location and restrict it to frame // bounds. info.touchableRegion = info.touchableRegion.translate(info.frameLeft, info.frameTop); - info.touchableRegion = info.touchableRegion.intersect(frame); info.visible = isVisible(); return info; } |