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

Commit 73c3fcf5 authored by Chong Zhang's avatar Chong Zhang
Browse files

Exclude system decor area from tap detection.

If we have system decor (status bar/ navigation bar), we want to
exclude that from the tap detection. Otherwise, if the app is partially
placed under some system button (eg. Recents, Home), pressing that
button would cause a full series of unwanted transfer focus/resume/pause,
before we could go home.

Change-Id: Idd408bd69f5064f906bb9f8e2b2385c26a6a6929
parent d5647923
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -373,6 +373,12 @@ class DisplayContent {
                     */
                    if (isFreeformed) {
                        mTmpRect.inset(-delta, -delta);
                        // Intersect with display content rect. If we have system decor (status bar/
                        // navigation bar), we want to exclude that from the tap detection.
                        // Otherwise, if the app is partially placed under some system button (eg.
                        // Recents, Home), pressing that button would cause a full series of
                        // unwanted transfer focus/resume/pause, before we could go home.
                        mTmpRect.intersect(mContentRect);
                    }
                    mTouchExcludeRegion.op(mTmpRect, Region.Op.DIFFERENCE);
                }