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 371930 - Xinput events incorrectly translated
Xinput events incorrectly translated
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Class: GdkDevice
2.90.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Carlos Garnacho
Depends on: 596725
Blocks:
 
 
Reported: 2006-11-07 10:16 UTC by Tommi Komulainen
Modified: 2018-05-02 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.06 KB, patch)
2006-11-07 10:17 UTC, Tommi Komulainen
needs-work Details | Review

Description Tommi Komulainen 2006-11-07 10:16:30 UTC
I've been told that XInput spec allows the maximum value for x/y axis to be 0 (or -1, depends on implementation I suppose) meaning bounded to screen size. In the current implementation 0 leads to division by zero and -1 gives totally bogus coordinates.
Comment 1 Tommi Komulainen 2006-11-07 10:17:02 UTC
Created attachment 76143 [details] [review]
proposed patch
Comment 2 Matthias Clasen 2006-12-21 06:17:22 UTC
I haven't been able to find this in the XInput spec.
All I could find is that min/max are 0 if the device is in relative mode.
Can you point me to that information in the spec ?
Comment 3 Tommi Komulainen 2006-12-21 17:45:11 UTC
You're right, it is not (explicitly) said in the current spec. Daniel Stone said he could amend the spec for XInput 1.4, but take this with grain of salt.

As I recall XInput does not have any event to notify clients the axis range has changed, say as a result of screen size change, so the special value of 0 or -1 works nicely as a special case for x/y axis.
Comment 4 Daniel Stone 2006-12-22 06:20:52 UTC
Hi,
This is indeed true: I thought the spec said this, but either I misread, or I can't find it anymore.  But, given there's no way to notify you of min_val/max_val changes, this seems to be basically the only sensible route.  Since I need to update the spec for general extended device usage anyway for 1.4, I can just clarify this at the same time ...
Comment 5 Michael Natterer 2007-01-23 10:23:01 UTC
Reopening based on comment #4, it probably doesn't hurt to apply thus
patch and be ahead of the spec :)
Comment 6 Michael Natterer 2007-01-23 10:48:06 UTC
Hm, on second look I wonder if the patch is correct for WINDOW mode.
Shouldn't it set "device_width" and "device_height" to the window's
width and hight then?
Comment 7 Tim Janik 2007-01-23 11:10:34 UTC
(In reply to comment #4)
> This is indeed true: I thought the spec said this, but either I misread, or I
> can't find it anymore.  But, given there's no way to notify you of
> min_val/max_val changes, this seems to be basically the only sensible route. 
> Since I need to update the spec for general extended device usage anyway for
> 1.4, I can just clarify this at the same time ...

Daniel, can you please post the actual text updates you have in mind for the spec? it's not clear to me atm what changes you're envisioning exactly and how they interact with the different SCREEN/WINDOW/RELATIVE input modes - and we need to know that to fix this bug.
Comment 8 Michael Natterer 2007-06-25 12:11:42 UTC
Daniel, can you please resopond to comment #7? We'd like to get
this fixed properly in GDK.
Comment 9 Christian Dywan 2008-10-30 14:32:55 UTC
What's the status here? Daniel, any chance you're giving this another shot? It would be a shame to leave this rusting here :)
Comment 10 Tobias Mueller 2009-05-30 14:57:55 UTC
Hm. This bug is set to NEEDINFO for quite some time now :-\ Could anybody either update patch 76143 or reject it?
Comment 11 Carlos Garnacho 2009-06-01 10:29:58 UTC
IMHO it makes sense to wait for XI2 support at this point...
Comment 12 Javier Jardón (IRC: jjardon) 2009-11-12 21:00:19 UTC
As suggested in comment #11, I've set xi2 branch integration bug as a blocker for this bug
Comment 13 Javier Jardón (IRC: jjardon) 2010-05-03 22:14:35 UTC
Still valid in GTK+ 2.20
Comment 14 Matthias Clasen 2011-01-07 12:43:31 UTC
moving xinput bugs to gdkdevice
Comment 15 GNOME Infrastructure Team 2018-05-02 14:22:12 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/269.