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

Commit 9d31ce12 authored by Robert Horvath's avatar Robert Horvath
Browse files

Mark touchable region of IME windows as unrestricted keep clear areas

Test: Manual
Bug: 227596282
Change-Id: Ic7088bbfeebc0ccee218c585f024b652f48f89a2
parent bfe127e4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -240,6 +240,7 @@ import com.android.internal.util.function.pooled.PooledLambda;
import com.android.internal.util.function.pooled.PooledPredicate;
import com.android.server.inputmethod.InputMethodManagerInternal;
import com.android.server.policy.WindowManagerPolicy;
import com.android.server.wm.utils.RegionUtils;
import com.android.server.wm.utils.RotationCache;
import com.android.server.wm.utils.WmDisplayCutout;

@@ -5686,6 +5687,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        forAllWindows(w -> {
            if (w.isVisible() && !w.inPinnedWindowingMode()) {
                w.getKeepClearAreas(outRestricted, outUnrestricted, tmpMatrix, tmpFloat9);

                if (w.mIsImWindow) {
                    Region touchableRegion = Region.obtain();
                    w.getEffectiveTouchableRegion(touchableRegion);
                    RegionUtils.forEachRect(touchableRegion, rect -> outUnrestricted.add(rect));
                }
            }

            // We stop traversing when we reach the base of a fullscreen app.