After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706652 - evdev: add callback to constrain the pointer position
evdev: add callback to constrain the pointer position
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
wayland
Depends on:
Blocks: 706655
 
 
Reported: 2013-08-23 12:01 UTC by Giovanni Campagna
Modified: 2013-09-09 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evdev: add callback to constrain the pointer position (5.18 KB, patch)
2013-08-23 12:01 UTC, Giovanni Campagna
none Details | Review
evdev: add callback to constrain the pointer position (5.26 KB, patch)
2013-09-06 09:34 UTC, Giovanni Campagna
none Details | Review
evdev: add callback to constrain the pointer position (5.55 KB, patch)
2013-09-06 12:07 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-08-23 12:01:30 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.
Comment 1 Giovanni Campagna 2013-08-23 12:01:33 UTC
Created attachment 252838 [details] [review]
evdev: add callback to constrain the pointer position
Comment 2 Giovanni Campagna 2013-09-06 09:34:47 UTC
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.
Comment 3 Giovanni Campagna 2013-09-06 12:07:56 UTC
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.
Comment 4 Emmanuele Bassi (:ebassi) 2013-09-09 09:50:25 UTC
Review of attachment 254244 [details] [review]:

looks good
Comment 5 Giovanni Campagna 2013-09-09 10:07:04 UTC
Attachment 254244 [details] pushed as aef3d00 - evdev: add callback to constrain the pointer position