Unset touch targets on no current touch points
ClosedPublic

Authored by romangg on Dec 12 2018, 12:27 PM.

Details

Summary

Certain input devices like touch screens can be in a state of having no input
target at all. In case of touch screens when there are no current touch points.

In this case unset and block at-surface targets until a touch point is
available again.

Test Plan

Auto test window-selection passes again.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Dec 12 2018, 12:27 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 12 2018, 12:27 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Dec 12 2018, 12:27 PM
romangg updated this revision to Diff 47440.Dec 12 2018, 12:33 PM
  • Constify function
zzag added a subscriber: zzag.Dec 12 2018, 2:03 PM

All autotests pass now ++

davidedmundson accepted this revision.Dec 12 2018, 2:46 PM
davidedmundson added a subscriber: davidedmundson.

Thanks for fixing.

touch_input.cpp
88

It's a weird name.
It's not like focusUpdateBlocked, where we're blocking changes, but that we want to actively unset "at" next update.

I would suggest something like "positionValid".

140

Unrelated.
Please put in a new commit with a new message.

Though the change makes sense, consider it reviewed here.

This revision is now accepted and ready to land.Dec 12 2018, 2:46 PM

Thanks for looking into it.

romangg added inline comments.Dec 13 2018, 9:47 AM
touch_input.cpp
140

It's not unrelated, because with this change this function always gets called when all touch points go away again. Before that the filter is run with the same code, which leads to two leave events, making another autotest fail.

But I'll put it in a second commit and say in the message which other autotest fails otherwise (have to look it up again).

romangg marked 3 inline comments as done.Dec 13 2018, 9:48 AM
This revision was automatically updated to reflect the committed changes.