Hide mouse cursor when interacting with touch screen
AcceptedPublic

Authored by graesslin on Sat, Dec 1, 1:54 PM.

Details

Reviewers
zzag
davidedmundson
Group Reviewers
KWin
Summary

On touch events the mouse cursor gets hidden, on next mouse event the
mouse cursor is shown again. This IMHO significantly improves the system
interaction if touch is the primary user interface.

Test Plan

Test case added and ctest passes

Diff Detail

Repository
R108 KWin
Branch
hide-cursor-on-touch
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5635
Build 5653: arc lint + arc unit
graesslin created this revision.Sat, Dec 1, 1:54 PM
Restricted Application added a project: KWin. · View Herald TranscriptSat, Dec 1, 1:54 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Sat, Dec 1, 1:54 PM
zzag added a subscriber: zzag.Sun, Dec 2, 1:10 PM

Wouldn't it be better to have TouchHideCursorSpy in input.cpp?

In D17280#369946, @zzag wrote:

Wouldn't it be better to have TouchHideCursorSpy in input.cpp?

Actually nowadays I consider adding all the spies and filters to input.cpp a mistake. I find it very cumbersome to read this file and it makes it impossible to unit test the filters (some could be unit tested instead of only integration testing).

zzag added inline comments.Sun, Dec 2, 2:38 PM
touch_hide_cursor_spy.cpp
2

Missing copyright header.

touch_hide_cursor_spy.h
2

Missing copyright header.

graesslin updated this revision to Diff 46713.Sun, Dec 2, 3:24 PM

Add missing copyright headers.

graesslin marked 2 inline comments as done.Sun, Dec 2, 3:25 PM
zzag accepted this revision.EditedSun, Dec 2, 4:47 PM

Looks good to me. (Please keep in mind that my decision is totally based on the provided test, I didn't test this patch on a physical device)


Off topic:

This file is part of the KDE project.

I've been wondering for a long time whether this statement is correct. (KDE is no longer a project, it's a community)

This revision is now accepted and ready to land.Sun, Dec 2, 4:47 PM
davidedmundson accepted this revision.Sun, Dec 2, 4:53 PM