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 725103 - evdev: Set the initial core pointer coordinates to a sane value
evdev: Set the initial core pointer coordinates to a sane value
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-24 22:25 UTC by Rui Matos
Modified: 2014-02-27 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evdev: Set the initial core pointer coordinates to a sane value (1.69 KB, patch)
2014-02-24 22:25 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2014-02-24 22:25:53 UTC
This avoids the possibility of the pointer wandering outside the stage
until it enters for the first time, after which mutter's constraint
callback starts working.
Comment 1 Rui Matos 2014-02-24 22:25:56 UTC
Created attachment 270196 [details] [review]
evdev: Set the initial core pointer coordinates to a sane value

ClutterInputDevice's default initial coordinates is (-1, -1) and since
they're updated from events in a relative way it means that the
pointer can go outside the stage right from the first event.

We usually let this up to higher layers to fix through the pointer
constraint callback but that doesn't work if the first event doesn't
put the pointer immediately inside the stage.
Comment 2 Emmanuele Bassi (:ebassi) 2014-02-24 22:47:54 UTC
Review of attachment 270196 [details] [review]:

looks okay to me. the (16,16) coordinates are a bit arbitrary: maybe a comment above their #define would be nice, but it's not, strictly speaking, necessary.
Comment 3 Rui Matos 2014-02-27 10:58:20 UTC
Pushed with a comment about the values.

Attachment 270196 [details] pushed as 458de11 - evdev: Set the initial core pointer coordinates to a sane value