Skip to content

Talon Eye Tracking Plugins don't take offset of monitor into account #202

@fmagin

Description

@fmagin

I have a monitor configuration like this, where the left monitor is the one with the eye tracker

image
The position of DP-1 in this case is (0, 840). Control Mouse and the debug overlay are both 840 pixels too high because of some assumption that is violated, potentially that the main screen is supposed to be located at (0,0).

With my own plugin and the gaze callback this is not an issue because I translate the relative position in the GazeFrame into the proper coordinates via some helpers:

setattr(Screen, 'dimensions', property(lambda s: Point2d(s.width, s.height)))
setattr(Screen, 'position', property(lambda s: Point2d(s.x, s.y)))
setattr(Screen, 'position_from_gaze', lambda self, relative_position:
relative_position * self.dimensions + self.position)

So far this seems to work without issues and makes writing eye tracking plugins quite comfortable, so adding helpers like this seems generally useful and might allow to easily fix this issue with Control Mouse.

In case this is relevant I am using i3 on Arch Linux (i.e. Xorg)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions