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

Commit 1dc2a757 authored by Merissa Mitchell's avatar Merissa Mitchell Committed by Android (Google) Code Review
Browse files

Merge "[WindowDecor] No-op keyboard shortcut for toggling from fullscreen" into main

parents d91d3e5f 6fa9802e
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -493,7 +493,23 @@ class DesktopTasksController(
        when (allFocusedTasks.size) {
            0 -> {}
            // Fullscreen -> Desktop.
            1 -> moveFullscreenTaskToDesktop(allFocusedTasks.single(), transitionSource)
            1 -> {
                val focusedTask = allFocusedTasks.single()
                // No-op toggling to Desktop via keyboard shortcut if we are mid-dragging the same
                // task to Desktop
                if (
                    transitionSource == DesktopModeTransitionSource.KEYBOARD_SHORTCUT &&
                        focusedTask.taskId == draggingTaskId
                ) {
                    logW(
                        "DesktopTasksController: Abandon keyboard shortcut attempt to toggle " +
                            "from fullscreen to Desktop because task with id=%d is mid-drag",
                        focusedTask.taskId,
                    )
                    return
                }
                moveFullscreenTaskToDesktop(focusedTask, transitionSource)
            }
            // Split screen -> Fullscreen (the active split screen app is moved into fullscreen).
            2 -> splitScreenController.goToFullscreenFromSplit()
            else ->