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

Commit 07115aae authored by Jorge Gil's avatar Jorge Gil Committed by Android (Google) Code Review
Browse files

Merge "Add FLAG_SPLIT_TOUCH to window decoration windows" into main

parents d31640d8 ce00b220
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -629,13 +629,21 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
                    && id != R.id.maximize_window) {
                return false;
            }
            moveTaskToFront(decoration.mTaskInfo);

            final int actionMasked = e.getActionMasked();
            final boolean isDown = actionMasked == MotionEvent.ACTION_DOWN;
            final boolean isUpOrCancel = actionMasked == MotionEvent.ACTION_CANCEL
                    || actionMasked == MotionEvent.ACTION_UP;
            if (isDown) {
                // Only move to front on down to prevent 2+ tasks from fighting
                // (and thus flickering) for front status when drag-moving them simultaneously with
                // two pointers.
                // TODO(b/356962065): during a drag-move, this shouldn't be a WCT - just move the
                //  task surface to the top of other tasks and reorder once the user releases the
                //  gesture together with the bounds' WCT. This is probably still valid for other
                //  gestures like simple clicks.
                moveTaskToFront(decoration.mTaskInfo);

                final boolean downInCustomizableCaptionRegion =
                        decoration.checkTouchEventInCustomizableRegion(e);
                final boolean downInExclusionRegion = mExclusionRegion.contains(
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wm.shell.windowdecor;

import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH;
import static android.view.WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
import static android.view.WindowManager.LayoutParams.INPUT_FEATURE_SPY;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
@@ -112,7 +113,7 @@ class DragResizeInputListener implements AutoCloseable {
                    mDecorationSurface,
                    mClientToken,
                    null /* hostInputToken */,
                    FLAG_NOT_FOCUSABLE,
                    FLAG_NOT_FOCUSABLE | FLAG_SPLIT_TOUCH,
                    PRIVATE_FLAG_TRUSTED_OVERLAY,
                    INPUT_FEATURE_SPY,
                    TYPE_APPLICATION,
+2 −1
Original line number Diff line number Diff line
@@ -185,7 +185,8 @@ class HandleMenu(
                    width = menuWidth,
                    height = menuHeight,
                    flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or
                            WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
                            WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH or
                            WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
                    view = handleMenuView.rootView
                )
            } else {
+2 −1
Original line number Diff line number Diff line
@@ -146,7 +146,8 @@ class MaximizeMenu(
                menuHeight,
                WindowManager.LayoutParams.TYPE_APPLICATION,
                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                        or WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
                        or WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
                        or WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
                PixelFormat.TRANSPARENT
        )
        lp.title = "Maximize Menu for Task=" + taskInfo.taskId
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.view.SurfaceControl
import android.view.SurfaceControlViewHost
import android.view.SurfaceSession
import android.view.WindowManager
import android.view.WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL
import android.view.WindowlessWindowManager
import android.widget.ImageView
import android.window.TaskConstants
@@ -151,6 +152,7 @@ class ResizeVeil @JvmOverloads constructor(
                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
                PixelFormat.TRANSPARENT)
        lp.title = "Resize veil icon window of Task=" + taskInfo.taskId
        lp.inputFeatures = INPUT_FEATURE_NO_INPUT_CHANNEL
        lp.setTrustedOverlay()
        val wwm = WindowlessWindowManager(taskInfo.configuration,
                iconSurface, null /* hostInputToken */)
Loading