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

Commit 7a31b773 authored by Andrii Kulian's avatar Andrii Kulian
Browse files

Update ime touch exclude region for hosting display

If IME for an application is situated on a different display,
then we need to update corresponding display content's touch
exclude region.

Bug: 36515606
Test: Manual, b/37911363
Change-Id: I43785de6f26adf88e9a76b9144b39f66f232a646
parent 5ee9a1df
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1793,7 +1793,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
            // events to be intercepted and used to change focus. This would likely cause a
            // disappearance of the input method.
            inputMethod.getTouchableRegion(mTmpRegion);
            mTouchExcludeRegion.op(mTmpRegion, Region.Op.UNION);
            if (inputMethod.getDisplayId() == mDisplayId) {
                mTouchExcludeRegion.op(mTmpRegion, Op.UNION);
            } else {
                // IME is on a different display, so we need to update its tap detector.
                // TODO(multidisplay): Remove when IME will always appear on same display.
                inputMethod.getDisplayContent().setTouchExcludeRegion(null /* focusedTask */);
            }
        }
        for (int i = mTapExcludedWindows.size() - 1; i >= 0; i--) {
            WindowState win = mTapExcludedWindows.get(i);