mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 01:34:46 +00:00
kwin/mobiletaskswitcher: Fix touchscreen not being able to dismiss task switcher
It seems TapHandler is not able to receive touchscreen events anymore, use MouseArea.
This commit is contained in:
parent
16c66c161d
commit
b3dc5f15ad
2 changed files with 13 additions and 16 deletions
|
|
@ -38,7 +38,7 @@ Item {
|
||||||
function activateApp() {
|
function activateApp() {
|
||||||
taskSwitcherState.wasInActiveTask = false;
|
taskSwitcherState.wasInActiveTask = false;
|
||||||
taskSwitcher.activateWindow(model.index, delegate.window);
|
taskSwitcher.activateWindow(model.index, delegate.window);
|
||||||
window.setMaximize(true, true);
|
delegate.window.setMaximize(true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function minimizeApp() {
|
function minimizeApp() {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
|
|
||||||
import org.kde.kwin 3.0 as KWinComponents
|
import org.kde.kwin 3.0 as KWinComponents
|
||||||
|
|
||||||
Item {
|
MouseArea {
|
||||||
id: root
|
id: root
|
||||||
readonly property int count: repeater.count
|
readonly property int count: repeater.count
|
||||||
|
|
||||||
|
|
@ -68,24 +68,21 @@ Item {
|
||||||
yScale: taskSwitcherState.currentScale
|
yScale: taskSwitcherState.currentScale
|
||||||
}
|
}
|
||||||
|
|
||||||
// taphandler activates even if delegate touched
|
onClicked: {
|
||||||
TapHandler {
|
console.log('tapped')
|
||||||
enabled: !taskSwitcherState.currentlyBeingOpened
|
|
||||||
|
|
||||||
onTapped: {
|
|
||||||
// if tapped on the background, then hide
|
// if tapped on the background, then hide
|
||||||
if (root.childAt(eventPoint.position.x, eventPoint.position.y) === null) {
|
if (!taskSwitcherState.currentlyBeingOpened) {
|
||||||
taskSwitcher.hide();
|
taskSwitcher.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onPressedChanged: {
|
onPressedChanged: {
|
||||||
if (pressed) {
|
console.log('pressed')
|
||||||
|
if (!taskSwitcherState.currentlyBeingOpened && pressed) {
|
||||||
// ensure animations aren't running when finger is pressed
|
// ensure animations aren't running when finger is pressed
|
||||||
taskSwitcherState.cancelAnimations();
|
taskSwitcherState.cancelAnimations();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: repeater
|
id: repeater
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue