Commit 9f9dc34c authored by Fushan Wen's avatar Fushan Wen 💬 Committed by Nate Graham
Browse files

kickoff: Do not accept stylus in TapHandler

When using a stylus, TapHandler will block KickoffItemDelegate from
receiving click events.

BUG: 445111


(cherry picked from commit a992f67b)
parent e17e4d0c
...@@ -154,6 +154,8 @@ EmptyPage { ...@@ -154,6 +154,8 @@ EmptyPage {
anchors.fill: parent anchors.fill: parent
z: 1 z: 1
TapHandler { // Filter mouse events to avoid flicking like ScrollView TapHandler { // Filter mouse events to avoid flicking like ScrollView
// Do not accept stylus as it will cause bug 445111.
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad | PointerDevice.TouchScreen
onGrabChanged: { onGrabChanged: {
const pressed = transition & (EventPoint.GrabPassive | EventPoint.GrabExclusive) && point.state & EventPoint.Pressed const pressed = transition & (EventPoint.GrabPassive | EventPoint.GrabExclusive) && point.state & EventPoint.Pressed
const deviceType = point.event.device.type const deviceType = point.event.device.type
......
...@@ -175,6 +175,8 @@ EmptyPage { ...@@ -175,6 +175,8 @@ EmptyPage {
anchors.fill: parent anchors.fill: parent
z: 1 z: 1
TapHandler { // Filter mouse events to avoid flicking like ScrollView TapHandler { // Filter mouse events to avoid flicking like ScrollView
// Do not accept stylus as it will cause bug 445111.
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad | PointerDevice.TouchScreen
onGrabChanged: { onGrabChanged: {
const pressed = transition & (EventPoint.GrabPassive | EventPoint.GrabExclusive) && point.state & EventPoint.Pressed const pressed = transition & (EventPoint.GrabPassive | EventPoint.GrabExclusive) && point.state & EventPoint.Pressed
const deviceType = point.event.device.type const deviceType = point.event.device.type
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment