What I am looking for is a way to prevent a pointer device (specifically the pen of a graphics tablet) from being used as a regular input pointer by X11 or Wayland. However, I would like to still be able to evaluate clicks and moves in my program. So basically tie the output of that pen to my application, ideally regardless of whether it has focus or not.
Under X11, devices can be set "floating", which prevents these from being used as generic input device, but I am not sure whether the same can be done in Wayland and how.
What is the best way to achieve this?