31b0be69e5
The code previously tried to compute the offset of a field in the valuator by subtracting the address of the valuator from the _value_ of the field (rather than the field's address). The correct way to do it would have been (note the &'s): assert(((void *) &v->axisVal - (void *) v) % sizeof(double) == 0); assert(((void *) &v->axes - (void *) v) % sizeof(double) == 0); That's essentially what the offsetof() macro does. Using offsetof() has the added benefit of not using void pointer arithmetic and therefore silencing a warning on some compilers. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |
||
---|---|---|
composite | ||
config | ||
damageext | ||
dbe | ||
dix | ||
doc | ||
dri3 | ||
exa | ||
fb | ||
glamor | ||
glx | ||
hw | ||
include | ||
m4 | ||
man | ||
mi | ||
miext | ||
os | ||
present | ||
pseudoramiX | ||
randr | ||
record | ||
render | ||
test | ||
Xext | ||
xfixes | ||
Xi | ||
xkb | ||
.dir-locals.el | ||
.gitignore | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
devbook.am | ||
docbook.am | ||
fix-miregion | ||
fix-miregion-private | ||
fix-patch-whitespace | ||
fix-region | ||
Makefile.am | ||
manpages.am | ||
README | ||
xorg-server.m4 | ||
xorg-server.pc.in | ||
xserver.ent.in |
X Server The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into. Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders. For a comprehensive overview of X Server and X Window System, consult the following article: http://en.wikipedia.org/wiki/X_server All questions regarding this software should be directed at the Xorg mailing list: http://lists.freedesktop.org/mailman/listinfo/xorg Please submit bug reports to the Xorg bugzilla: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg The master development code repository can be found at: git://anongit.freedesktop.org/git/xorg/xserver http://cgit.freedesktop.org/xorg/xserver For patch submission instructions, see: http://www.x.org/wiki/Development/Documentation/SubmittingPatches For more information on the git code manager, see: http://wiki.x.org/wiki/GitPage