mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
taskswitcher: Remove all interaction restrictions while the task switcher is opening
This allows users to properly interact (open apps, dismiss) while the task switcher is in its opening animation. This fixes tapping on an app while the task switcher is opening dismissing the task switcher entirely (due to race condition)
This commit is contained in:
parent
b5e58a8db1
commit
7cb6ebaae1
3 changed files with 6 additions and 5 deletions
|
|
@ -57,7 +57,6 @@ Item {
|
|||
id: control
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
enabled: !taskSwitcher.taskSwitcherState.currentlyBeingOpened
|
||||
|
||||
// set cursor shape here, since taphandler seems to not be able to do it
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
|
@ -70,7 +69,7 @@ Item {
|
|||
}
|
||||
|
||||
onClicked: {
|
||||
if (!taskSwitcher.taskSwitcherState.currentlyBeingOpened && !passedDragThreshold) {
|
||||
if (!passedDragThreshold) {
|
||||
delegate.activateApp();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,9 +76,7 @@ MouseArea {
|
|||
|
||||
onClicked: {
|
||||
// if tapped on the background, then hide
|
||||
if (!taskSwitcherState.currentlyBeingOpened) {
|
||||
taskSwitcher.hide();
|
||||
}
|
||||
taskSwitcher.hide();
|
||||
}
|
||||
|
||||
onPressedChanged: {
|
||||
|
|
|
|||
|
|
@ -136,6 +136,10 @@ QtObject {
|
|||
}
|
||||
|
||||
function openApp(index, window) {
|
||||
// cancel any opening animations ongoing
|
||||
currentlyBeingOpened = false;
|
||||
cancelAnimations();
|
||||
|
||||
animateGoToTaskIndex(index, Kirigami.Units.shortDuration);
|
||||
openAppAnim.restart();
|
||||
KWinComponents.Workspace.activeWindow = window
|
||||
|
|
|
|||
Loading…
Reference in a new issue