xserver-multidpi/dix
Joe Shaw e354ccac36 fix a sign problem with valuator data.
Without this patch, any negative valuator value is wrong when returned
from XQueryDeviceState().  This is a regression from at least xserver
1.4.

Valuator data is set in dix/getevents.c:set_valuators() by copying
signed int values into an unsigned int field
DeviceEvent.valuators.data.

That data is converted into a double with an implicit cast by
assignment to axisVal[i] in Xi/exevents.c:UpdateDeviceState().

That double is converted back to a signed int in
queryst.c:ProcXQueryDeviceState().  If the original value in
set_valuators() is negative, the double value will be > 2^31 and the
conversion back to a signed int is undefined.  (Although I
consistently see the value -2^31.)

Fix this by changing the definition of DeviceEvent.valuators.data from
uint32_t to int32_t.

Signed-off-by: Joe Shaw <joeshaw@litl.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-18 10:16:23 +10:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
atom.c Misc coding style cleanup 2010-05-13 06:16:48 +07:00
buildatoms XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
BuiltInAtoms R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
colormap.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
cursor.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
deprecated.c dix: remove dixLookupResource - we don't have any users left. 2009-09-07 10:51:16 +10:00
devices.c Use GetCurrentRootWindow or equivalent instead of spriteTrace[0]. 2010-10-13 15:58:12 +10:00
dispatch.c Comparison between pointer and integer in latest dix/dispatch.c 2010-10-13 10:20:06 -07:00
dispatch.h xserver: delete pervasively use of DISPATCH_PROC 2010-09-28 16:45:05 +03:00
dixfonts.c dixfonts: Deobfuscate GC ops calls. 2010-09-13 15:55:17 -07:00
dixutils.c dix: optimize CallCallbacks 2010-10-13 09:24:06 -07:00
enterleave.c Use GetCurrentRootWindow or equivalent instead of spriteTrace[0]. 2010-10-13 15:58:12 +10:00
enterleave.h dix: call SetFocusOut and LeaveWindow when disabling a device. 2009-08-03 10:11:48 +10:00
eventconvert.c dix: don't create core motion events for non-x/y valuators. 2010-09-01 14:42:44 +10:00
events.c Use GetCurrentRootWindow or equivalent instead of spriteTrace[0]. 2010-10-13 15:58:12 +10:00
extension.c Replace malloc/strlen/strcpy with strdup. 2010-08-27 19:05:48 -04:00
ffs.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
gc.c Un-export CreateScratchGC now that nothing external uses it. 2010-09-13 15:58:08 -07:00
getevents.c fix a sign problem with valuator data. 2010-10-18 10:16:23 +10:00
globals.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
glyphcurs.c Replace dixChangeGC with calls directly to the right variant. 2010-05-13 17:14:07 -07:00
grabs.c Remove more superfluous if(p) checks around free(p) 2010-06-06 20:27:18 +07:00
initatoms.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
inpututils.c Return Success from generate_modkeymap() when max_keys_per_mod is zero 2010-09-01 14:44:46 +10:00
main.c dix: remove proc tables initialization 2010-09-28 16:46:46 +03:00
Makefile.am Move mi/miregion.c to dix/region.c 2010-06-05 17:48:20 -07:00
pixmap.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
privates.c Introduce per-object per-screen privates. 2010-09-18 11:17:18 +02:00
property.c Fix property and selection devPrivate allocation. 2010-09-10 11:44:12 -07:00
protocol.txt Add DRI2 requests to protocol.txt 2009-08-28 23:29:05 -04:00
ptrveloc.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
region.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
registry.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
resource.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
selection.c Fix property and selection devPrivate allocation. 2010-09-10 11:44:12 -07:00
swaprep.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
swapreq.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
tables.c dix: remove proc tables initialization 2010-09-28 16:46:46 +03:00
window.c dix: reset pScreen->root to NULL when root window is deleted. 2010-08-16 11:50:22 -07:00
Xserver-dtrace.h.in Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00
Xserver.d Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00