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

Commit b72c9ad7 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

No input for windows in minimized docked stack

Also make them unfocusable, and don't focus the docked
stack when tapping into it in that state.

Bug: 27972642
Change-Id: Ic24ff9a5f39f596fe4a2f50567566d4400f9c125
parent 2917dc49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ class DisplayContent {
        for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
            TaskStack stack = mStacks.get(stackNdx);
            stack.getBounds(mTmpRect);
            if (!mTmpRect.contains(x, y)) {
            if (!mTmpRect.contains(x, y) || stack.isAdjustedForMinimizedDockedStack()) {
                continue;
            }
            final ArrayList<Task> tasks = stack.getTasks();
+2 −1
Original line number Diff line number Diff line
@@ -294,7 +294,8 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
                final WindowState child = windows.get(winNdx);
                final InputChannel inputChannel = child.mInputChannel;
                final InputWindowHandle inputWindowHandle = child.mInputWindowHandle;
                if (inputChannel == null || inputWindowHandle == null || child.mRemoved) {
                if (inputChannel == null || inputWindowHandle == null || child.mRemoved
                        || child.isAdjustedForMinimizedDock()) {
                    // Skip this window because it cannot possibly receive input.
                    continue;
                }
+7 −1
Original line number Diff line number Diff line
@@ -1390,6 +1390,11 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        return configChanged;
    }

    boolean isAdjustedForMinimizedDock() {
        return mAppToken != null && mAppToken.mTask != null
                && mAppToken.mTask.mStack.isAdjustedForMinimizedDock();
    }

    void removeLocked() {
        disposeInputChannel();

@@ -1776,7 +1781,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        return isVisibleOrAdding()
                && (mViewVisibility == View.VISIBLE)
                && ((mAttrs.flags & WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE) == 0)
                && (mAppToken == null || mAppToken.windowsAreFocusable());
                && (mAppToken == null || mAppToken.windowsAreFocusable())
                && !isAdjustedForMinimizedDock();
    }

    @Override