Hide mouse cursor when interacting with touch screen
ClosedPublic

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

Details

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Dec 1 2018, 1:54 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 1 2018, 1:54 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Dec 1 2018, 1:54 PM
zzag added a subscriber: zzag.Dec 2 2018, 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.Dec 2 2018, 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.Dec 2 2018, 3:24 PM

Add missing copyright headers.

graesslin marked 2 inline comments as done.Dec 2 2018, 3:25 PM
zzag accepted this revision.EditedDec 2 2018, 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.Dec 2 2018, 4:47 PM
davidedmundson accepted this revision.Dec 2 2018, 4:53 PM
This revision was automatically updated to reflect the committed changes.