Implement support for locked pointer cursor hints. Cursor hints can be
retrieved by the compositor either continuously by connecting to the
cursorHintChanged signal or only when needed. In the later case the
compositor must connect to the aboutToUnbound signal of the locked pointer
interface in order to fetch the last hint before the interface is unbound.
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Maniphest Tasks
- T4692: [kwayland] Support cursor hint on LockedPointerInterface
- Commits
- R127:cebfd2f8d2f9: Support cursor hints on locked pointer
Autotest added.
Diff Detail
- Repository
- R127 KWayland
- Branch
- cursorHints
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 941 Build 954: arc lint + arc unit
autotests/client/test_pointer_constraints.cpp | ||
---|---|---|
258 | We should check the value of hintChangedSpy.first() to properly test it. Also, use something better than 1,0 to check y is set correctly | |
src/server/pointerconstraints_interface.h | ||
126 | do we not want a getter method? One of kwayland's main roles is to be a property cache | |
165 | @since | |
src/server/pointerconstraints_interface_v1.cpp | ||
175 | Only non-negative x and y values are allowed is it worth enforcing that with a check here? |
src/server/pointerconstraints_interface.h | ||
---|---|---|
126 | The hint is used by the compositor after unlock again. This unlock can also happen on destruction of the LockedPointerInterface. So one need to to connect to a signal announcing this and then set the pointer position. Resource has a aboutToBeUnbound signal. Maybe use this? | |
src/server/pointerconstraints_interface_v1.cpp | ||
175 | I wanted to allow negative values, such that a client can decide to opt-out of hinting again. Sadly the specs does not say anything about invalid values. But my assumption is that a client should only be allowed to shift the cursor in the dimensions of its surface. |