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

Commit 37438ccb authored by Alp Yalcin's avatar Alp Yalcin Committed by Android (Google) Code Review
Browse files

Merge "[3/n] Create the new window for the torn tab from top-center at drop point" into main

parents a5896ed0 33f6e24b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -5781,16 +5781,15 @@ class DesktopTasksController(
                ) {
                    // Inherit parent's bounds.
                    newWindowBounds.set(taskInfo.configuration.windowConfiguration.bounds)
                    // TODO: (b/436504714) - Implement the new positioning logic here.
                } else {
                    // Use default bounds, but with the top-center at the drop point.
                    newWindowBounds.set(calculateDefaultDesktopTaskBounds(displayLayout))
                }
                // Create the new window from the top-center at the drop point.
                newWindowBounds.offsetTo(
                        dragEvent.x.toInt() - (newWindowBounds.width() / 2),
                        dragEvent.y.toInt(),
                    )
            }
            }
            IndicatorType.TO_SPLIT_RIGHT_INDICATOR -> {
                newWindowBounds.set(getSnapBounds(destinationDisplay, SnapPosition.RIGHT))
            }
+4 −4
Original line number Diff line number Diff line
@@ -10030,7 +10030,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(100, 100, 300, 300),
            Rect(1100, 700, 1300, 900),
            tabTearingMinimizeAnimationFlagEnabled = true,
            tabTearingLaunchAnimationFlagEnabled = true,
        )
@@ -10046,7 +10046,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(100, 100, 300, 300),
            Rect(1100, 700, 1300, 900),
            tabTearingMinimizeAnimationFlagEnabled = true,
            tabTearingLaunchAnimationFlagEnabled = false,
        )
@@ -10062,7 +10062,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(100, 100, 300, 300),
            Rect(1100, 700, 1300, 900),
            tabTearingMinimizeAnimationFlagEnabled = false,
            tabTearingLaunchAnimationFlagEnabled = true,
        )
@@ -10078,7 +10078,7 @@ class DesktopTasksControllerTest(flags: FlagsParameterization) : ShellTestCase()
        testOnUnhandledDrag(
            DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR,
            PointF(1200f, 700f),
            Rect(100, 100, 300, 300),
            Rect(1100, 700, 1300, 900),
            tabTearingMinimizeAnimationFlagEnabled = false,
            tabTearingLaunchAnimationFlagEnabled = false,
        )