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

Commit 9b9d6d06 authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Layer caption container surface behind corner input region." into udc-qpr-dev

parents 50c0ca36 c2d0acd7
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -56,7 +56,6 @@ import com.android.internal.view.BaseIWindow;
 */
 */
class DragResizeInputListener implements AutoCloseable {
class DragResizeInputListener implements AutoCloseable {
    private static final String TAG = "DragResizeInputListener";
    private static final String TAG = "DragResizeInputListener";
    private static final float TOP_CORNER_PADDING = 1.5f;
    private final IWindowSession mWindowSession = WindowManagerGlobal.getWindowSession();
    private final IWindowSession mWindowSession = WindowManagerGlobal.getWindowSession();
    private final Handler mHandler;
    private final Handler mHandler;
    private final Choreographer mChoreographer;
    private final Choreographer mChoreographer;
@@ -435,10 +434,7 @@ class DragResizeInputListener implements AutoCloseable {
            }
            }
            double distanceFromCenter = Math.hypot(x - centerX, y - centerY);
            double distanceFromCenter = Math.hypot(x - centerX, y - centerY);


            // TODO(b/286461778): Remove this when input in top corner gap no longer goes to header
            if (distanceFromCenter < mTaskCornerRadius + mResizeHandleThickness
            float cornerPadding = (ctrlType & CTRL_TYPE_TOP) != 0 ? TOP_CORNER_PADDING : 1;

            if (distanceFromCenter < mTaskCornerRadius + mResizeHandleThickness * cornerPadding
                    && distanceFromCenter >= mTaskCornerRadius) {
                    && distanceFromCenter >= mTaskCornerRadius) {
                return ctrlType;
                return ctrlType;
            }
            }
+5 −0
Original line number Original line Diff line number Diff line
@@ -237,7 +237,12 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>


        final int captionHeight = loadDimensionPixelSize(resources, params.mCaptionHeightId);
        final int captionHeight = loadDimensionPixelSize(resources, params.mCaptionHeightId);
        final int captionWidth = taskBounds.width();
        final int captionWidth = taskBounds.width();

        // We use mDecorationContainerSurface to define input window for task resizing; by layering
        // it in front of mCaptionContainerSurface, we can allow it to handle input prior to
        // caption view itself, treating corner inputs as resize events rather than repositioning.
        startT.setWindowCrop(mCaptionContainerSurface, captionWidth, captionHeight)
        startT.setWindowCrop(mCaptionContainerSurface, captionWidth, captionHeight)
                .setLayer(mCaptionContainerSurface, -1)
                .show(mCaptionContainerSurface);
                .show(mCaptionContainerSurface);


        if (ViewRootImpl.CAPTION_ON_SHELL) {
        if (ViewRootImpl.CAPTION_ON_SHELL) {