Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java +1 −5 Original line number Original line Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java +1 −5 Original line number Original line Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading