Add relative mode flag to mouse processors

The default mouse injection works in absolute mode: it forwards clicks
at a specific position on screen.

To support HID mouse, add a flag to indicate that the mouse processor
works in relative mode: it forwards mouse motion vectors, without any
absolute reference to the screen.
This commit is contained in:
Romain Vimont
2021-12-30 15:46:00 +01:00
parent 924375487e
commit b5855e5deb
3 changed files with 19 additions and 0 deletions

View File

@@ -16,6 +16,13 @@
*/
struct sc_mouse_processor {
const struct sc_mouse_processor_ops *ops;
/**
* If set, the mouse processor works in relative mode (the absolute
* position is irrelevant). In particular, it indicates that the mouse
* pointer must be "captured" by the UI.
*/
bool relative_mode;
};
struct sc_mouse_processor_ops {