GNOME Bugzilla – Bug 706652
evdev: add callback to constrain the pointer position
Last modified: 2013-09-09 10:07:08 UTC
Add a new callback that is called prior to emitting pointer motion events and that can modify the new pointer position. The main purpose is allowing multiscreen apps to prevent the pointer for entering the dead area that exists when the screens are not the same size, but it could also used to implement pointer barriers. A callback is needed to make sure that the hook is called early enough and the Clutter state is always consistent.
Created attachment 252838 [details] [review] evdev: add callback to constrain the pointer position
Created attachment 254237 [details] [review] evdev: add callback to constrain the pointer position Add a new callback that is called prior to emitting pointer motion events and that can modify the new pointer position. The main purpose is allowing multiscreen apps to prevent the pointer for entering the dead area that exists when the screens are not the same size, but it could also used to implement pointer barriers. A callback is needed to make sure that the hook is called early enough and the Clutter state is always consistent. I added a timestamp indication to the callback, to allow precise velocity tracking in pointer barriers.
Created attachment 254244 [details] [review] evdev: add callback to constrain the pointer position Add a new callback that is called prior to emitting pointer motion events and that can modify the new pointer position. The main purpose is allowing multiscreen apps to prevent the pointer for entering the dead area that exists when the screens are not the same size, but it could also used to implement pointer barriers. A callback is needed to make sure that the hook is called early enough and the Clutter state is always consistent. Also don't clamp to the stage size, otherwise it's impossible to put a pointer barrier at the borders of the stage.
Review of attachment 254244 [details] [review]: looks good
Attachment 254244 [details] pushed as aef3d00 - evdev: add callback to constrain the pointer position