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

Commit 3727218c authored by Vania Desmonda's avatar Vania Desmonda Committed by Android (Google) Code Review
Browse files

Merge "Allow edge resizing using touchpad." into main

parents 5db0901c 48e6d523
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.wm.shell.windowdecor;

import static android.view.InputDevice.SOURCE_MOUSE;
import static android.view.InputDevice.SOURCE_TOUCHSCREEN;

import static com.android.wm.shell.shared.desktopmode.DesktopModeFlags.EDGE_DRAG_RESIZE;
@@ -166,7 +167,10 @@ final class DragResizeWindowGeometry {
    static boolean isEdgeResizePermitted(@NonNull Context context, @NonNull MotionEvent e) {
        if (EDGE_DRAG_RESIZE.isEnabled(context)) {
            return e.getToolType(0) == MotionEvent.TOOL_TYPE_STYLUS
                    || e.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE;
                    || e.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE
                    // Touchpad input
                    || (e.isFromSource(SOURCE_MOUSE)
                        && e.getToolType(0) == MotionEvent.TOOL_TYPE_FINGER);
        } else {
            return e.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE;
        }