[tests] Add pointer constraints test
ClosedPublic

Authored by romangg on Jun 8 2018, 11:14 PM.

Details

Summary

Provides a testing application for pointer locking and pointer confining in
a Wayland session.

The application can be started with QT_QPA_PLATFORM variable set to wayland
or xcb to test constraining in native mode as well as through Xwayland.

Several modes and properties can be selected to test various forms of locking
and confining.

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.Jun 8 2018, 11:14 PM
Restricted Application added a project: KWin. · View Herald TranscriptJun 8 2018, 11:14 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Jun 8 2018, 11:14 PM
romangg edited the summary of this revision. (Show Details)Jun 8 2018, 11:16 PM
zzag added a subscriber: zzag.Jun 9 2018, 12:23 AM
zzag added inline comments.
tests/pointerconstraintstest.cpp
258

Why NULL?

tests/pointerconstraintstest.h
149

Forgot Q_OBJECT macro.

romangg added inline comments.Jun 9 2018, 12:01 PM
tests/pointerconstraintstest.cpp
258

Means it connects to the Xserver sepcified through DISPLAY env var and uses the first screen (only one on Xwayland anyways).

Writing NULL, because it's a C API.

tests/pointerconstraintstest.h
149

I could, but it's not needed here. I could remove it from the WaylandBackend class instead as well.

davidedmundson accepted this revision.Jun 9 2018, 12:05 PM
davidedmundson added a subscriber: davidedmundson.

As for the rest. Ship it

tests/pointerconstraintstest.h
149

I would add it.

Missing a Q_OBJECT macro can result in wasting hours in the future trying to work out why your slot silently doesn't work.

This revision is now accepted and ready to land.Jun 9 2018, 12:05 PM
This revision was automatically updated to reflect the committed changes.