[PATCH libX11 2/2] nls/Makefile.am: Use LOG_COMPILER
TESTS_ENVIRONMENT is deprecated Signed-off-by: Quentin Glidic sardemff7+...@sardemff7.net --- nls/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nls/Makefile.am b/nls/Makefile.am index bef2d2b..53eaacd 100644 --- a/nls/Makefile.am +++ b/nls/Makefile.am @@ -37,7 +37,7 @@ locale.dir: locale.dir.pre cat locale.dir.l2 locale.dir.l1 locale.dir if HAVE_PERL -TESTS_ENVIRONMENT = $(PERL) +LOG_COMPILER = $(PERL) TESTS = compose-check.pl endif HAVE_PERL -- 1.8.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH libX11 1/2] nls/Makefile.am: Remove unneeded $(srcdir)
Signed-off-by: Quentin Glidic sardemff7+...@sardemff7.net --- nls/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nls/Makefile.am b/nls/Makefile.am index 0eced4c..bef2d2b 100644 --- a/nls/Makefile.am +++ b/nls/Makefile.am @@ -38,7 +38,7 @@ locale.dir: locale.dir.pre if HAVE_PERL TESTS_ENVIRONMENT = $(PERL) -TESTS = $(srcdir)/compose-check.pl +TESTS = compose-check.pl endif HAVE_PERL -- 1.8.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] libpciaccess: Add domain support for sparc platform
On 12/18/12 04:07 PM, Henry Zhao wrote: From: Henry Zhao henry.z...@oracle.com Date: Tue, 18 Dec 2012 15:10:46 -0800 Subject: [PATCH] libpciaccess: Add domain support for sparc platform Add domain support for sparc platform. As a result the code of finding nexus node for a device in sparc is simpified and made the same as x86. Signed-off-by: Henry Zhao henry.z...@oracle.com --- src/common_init.c |8 src/solx_devfs.c | 109 ++--- 2 files changed, 29 insertions(+), 88 deletions(-) Looks okay to me, and no one else objected, so pushed to git master: To ssh://git.freedesktop.org/git/xorg/lib/libpciaccess 897cad2..3e17f06 master - master Thanks, -alan- ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH evdev 1/4] Move allocation of EvdevRec into a helper function
Makes it easier to initialise everything to the right values. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/evdev.c b/src/evdev.c index 5667dc1..baa7ac1 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2461,13 +2461,20 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) xf86DeleteInput(pInfo, flags); } +static EvdevPtr +EvdevAlloc(void) +{ +EvdevPtr pEvdev = calloc(sizeof(EvdevRec), 1); +return pEvdev; +} + static int EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) { EvdevPtr pEvdev; int rc = BadAlloc; -if (!(pEvdev = calloc(sizeof(EvdevRec), 1))) +if (!(pEvdev = EvdevAlloc())) goto error; pInfo-private = pEvdev; -- 1.8.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH evdev 2/4] Move some stuff into the new alloc function
Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index baa7ac1..a9b1fd2 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -2464,7 +2464,25 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) static EvdevPtr EvdevAlloc(void) { +int i; EvdevPtr pEvdev = calloc(sizeof(EvdevRec), 1); + +if (!pEvdev) +return NULL; +/* + * We initialize pEvdev-in_proximity to 1 so that device that doesn't use + * proximity will still report events. + */ +pEvdev-in_proximity = 1; +pEvdev-use_proximity = 1; + +#ifdef MULTITOUCH +pEvdev-cur_slot = -1; +#endif + +for (i = 0; i ArrayLength(pEvdev-axis_map); i++) +pEvdev-axis_map[i] = -1; + return pEvdev; } @@ -2487,17 +2505,6 @@ EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) if (rc != Success) goto error; -#ifdef MULTITOUCH -pEvdev-cur_slot = -1; -#endif - -/* - * We initialize pEvdev-in_proximity to 1 so that device that doesn't use - * proximity will still report events. - */ -pEvdev-in_proximity = 1; -pEvdev-use_proximity = 1; - /* Grabbing the event device stops in-kernel event forwarding. In other words, it disables rfkill and the Macintosh mouse button emulation. Note that this needs a server that sets the console to RAW mode. */ -- 1.8.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH evdev 3/4] Split rel and abs axis mapping into two separate arrays
This will enable a device to have relative scrolling axes in addition to absolute axes (required by the QEMU tablet). Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/emuWheel.c | 2 +- src/evdev.c| 66 +++--- src/evdev.h| 3 ++- 3 files changed, 29 insertions(+), 42 deletions(-) diff --git a/src/emuWheel.c b/src/emuWheel.c index db989c5..5774930 100644 --- a/src/emuWheel.c +++ b/src/emuWheel.c @@ -117,7 +117,7 @@ EvdevWheelEmuFilterMotion(InputInfoPtr pInfo, struct input_event *pEv) /* We don't want to intercept real mouse wheel events */ if(pEv-type == EV_ABS) { - int axis = pEvdev-axis_map[pEv-code]; + int axis = pEvdev-abs_axis_map[pEv-code]; oldValue = valuator_mask_get(pEvdev-vals, axis); valuator_mask_set(pEvdev-vals, axis, value); value -= oldValue; /* make value into a differential measurement */ diff --git a/src/evdev.c b/src/evdev.c index a9b1fd2..9741821 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -123,7 +123,7 @@ static int EvdevOpenDevice(InputInfoPtr pInfo); static void EvdevCloseDevice(InputInfoPtr pInfo); static void EvdevInitAxesLabels(EvdevPtr pEvdev, int mode, int natoms, Atom *atoms); -static void EvdevInitOneAxisLabel(EvdevPtr pEvdev, int axis, +static void EvdevInitOneAxisLabel(EvdevPtr pEvdev, int mapped_axis, const char **labels, int label_idx, Atom *atoms); static void EvdevInitButtonLabels(EvdevPtr pEvdev, int natoms, Atom *atoms); static void EvdevInitProperty(DeviceIntPtr dev); @@ -479,7 +479,7 @@ EvdevProcessValuators(InputInfoPtr pInfo) for (i = 0; i REL_CNT; i++) { -int map = pEvdev-axis_map[i]; +int map = pEvdev-rel_axis_map[i]; if (pEvdev-delta[i] map != -1) valuator_mask_set(pEvdev-vals, map, pEvdev-delta[i]); } @@ -701,7 +701,7 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev) pEvdev-rel_queued = 1; pEvdev-delta[ev-code] += value; -map = pEvdev-axis_map[ev-code]; +map = pEvdev-rel_axis_map[ev-code]; valuator_mask_set(pEvdev-vals, map, value); break; } @@ -787,7 +787,7 @@ EvdevProcessTouchEvent(InputInfoPtr pInfo, struct input_event *ev) } else pEvdev-slot_state = SLOTSTATE_CLOSE; } else { -map = pEvdev-axis_map[ev-code]; +map = pEvdev-abs_axis_map[ev-code]; valuator_mask_set(pEvdev-mt_mask, map, ev-value); if (slot_index = 0) valuator_mask_set(pEvdev-last_mt_vals[slot_index], map, @@ -827,7 +827,7 @@ EvdevProcessAbsoluteMotionEvent(InputInfoPtr pInfo, struct input_event *ev) EvdevProcessTouchEvent(pInfo, ev); pEvdev-abs_queued = 1; } else if (!pEvdev-mt_mask) { -map = pEvdev-axis_map[ev-code]; +map = pEvdev-abs_axis_map[ev-code]; valuator_mask_set(pEvdev-vals, map, value); pEvdev-abs_queued = 1; } @@ -1330,7 +1330,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) int j; #endif int mapping; -pEvdev-axis_map[axis] = -1; +pEvdev-abs_axis_map[axis] = -1; if (!EvdevBitIsSet(pEvdev-abs_bitmask, axis) || is_blacklisted_axis(axis)) continue; @@ -1347,7 +1347,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) mapping = mt_axis_mappings[j].mapping; } #endif -pEvdev-axis_map[axis] = mapping; +pEvdev-abs_axis_map[axis] = mapping; if (mapping == i) i++; } @@ -1380,11 +1380,11 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) for (i = 0; i num_slots(pEvdev); i++) { for (axis = ABS_MT_TOUCH_MAJOR; axis ABS_MAX; axis++) { -if (pEvdev-axis_map[axis] = 0) { +if (pEvdev-abs_axis_map[axis] = 0) { /* XXX: read initial values from mtdev when it adds support * for doing so. */ valuator_mask_set(pEvdev-last_mt_vals[i], - pEvdev-axis_map[axis], 0); + pEvdev-abs_axis_map[axis], 0); } } } @@ -1392,7 +1392,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) #endif for (axis = ABS_X; axis ABS_MT_SLOT; axis++) { -int axnum = pEvdev-axis_map[axis]; +int axnum = pEvdev-abs_axis_map[axis]; int resolution = 0; if (axnum == -1) @@ -1414,7 +1414,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) #ifdef MULTITOUCH for (axis = ABS_MT_TOUCH_MAJOR; axis = ABS_MAX; axis++) { -int axnum = pEvdev-axis_map[axis]; +int axnum = pEvdev-abs_axis_map[axis]; int resolution = 0; int j; BOOL skip =
[PATCH evdev 4/4] Allow relative scroll valuators on absolute devices (#54387)
Special-case RHEL_WHEEL, RHEL_HWHEEL and REL_DIAL to add scroll valuators for those axes in addition to the absolute axes. X.Org Bug 54387 http://bugs.freedesktop.org/show_bug.cgi?id=54387 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/evdev.c | 88 + 1 file changed, 83 insertions(+), 5 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index 9741821..c25bea4 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -692,7 +692,9 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev) #endif default: /* Ignore EV_REL events if we never set up for them. */ -if (!(pEvdev-flags EVDEV_RELATIVE_EVENTS)) +if (!(pEvdev-flags EVDEV_RELATIVE_EVENTS) +ev-code != REL_WHEEL ev-code != REL_DIAL +ev-code != REL_HWHEEL) return; /* Handle mouse wheel emulation */ @@ -1215,7 +1217,7 @@ is_blacklisted_axis(int axis) static int -EvdevAddAbsValuatorClass(DeviceIntPtr device) +EvdevAddAbsValuatorClass(DeviceIntPtr device, int want_scroll_axes) { InputInfoPtr pInfo; EvdevPtr pEvdev; @@ -1224,6 +1226,7 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) num_mt_axes_total = 0; /* total number of MT axes, including double-counted ones, excluding blacklisted */ Atom *atoms; +int mapping = 0; pInfo = device-public.devicePrivate; pEvdev = pInfo-private; @@ -1263,6 +1266,19 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) } } #endif + +#ifdef HAVE_SMOOTH_SCROLLING +if (want_scroll_axes EvdevBitIsSet(pEvdev-bitmask, EV_REL)) +{ +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_WHEEL)) +num_axes++; +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_HWHEEL)) +num_axes++; +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_DIAL)) +num_axes++; +} +#endif + if (num_axes + num_mt_axes MAX_VALUATORS) { xf86IDrvMsg(pInfo, X_WARNING, found %d axes, limiting to %d.\n, num_axes, MAX_VALUATORS); num_axes = MAX_VALUATORS; @@ -1329,7 +1345,6 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) #ifdef MULTITOUCH int j; #endif -int mapping; pEvdev-abs_axis_map[axis] = -1; if (!EvdevBitIsSet(pEvdev-abs_bitmask, axis) || is_blacklisted_axis(axis)) @@ -1352,6 +1367,20 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) i++; } +#ifdef HAVE_SMOOTH_SCROLLING +if (want_scroll_axes) +{ +mapping++; /* continue from abs axis mapping */ + +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_HWHEEL)) +pEvdev-rel_axis_map[REL_HWHEEL] = mapping++; +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_DIAL)) +pEvdev-rel_axis_map[REL_DIAL] = mapping++; +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_WHEEL)) +pEvdev-rel_axis_map[REL_WHEEL] = mapping++; +} +#endif + EvdevInitAxesLabels(pEvdev, Absolute, pEvdev-num_vals + num_mt_axes, atoms); if (!InitValuatorClassDeviceStruct(device, num_axes + num_mt_axes, atoms, @@ -1446,6 +1475,51 @@ EvdevAddAbsValuatorClass(DeviceIntPtr device) } #endif +#ifdef HAVE_SMOOTH_SCROLLING +if (want_scroll_axes) +{ +int idx; +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_WHEEL)) +{ +idx = REL_WHEEL; +xf86InitValuatorAxisStruct(device, + pEvdev-rel_axis_map[idx], + atoms[pEvdev-rel_axis_map[idx]], + NO_AXIS_LIMITS, NO_AXIS_LIMITS, + 0, 0, 0, Relative); +SetScrollValuator(device, pEvdev-rel_axis_map[idx], + SCROLL_TYPE_VERTICAL, -1.0, + SCROLL_FLAG_PREFERRED); +} + +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_HWHEEL)) +{ +idx = REL_HWHEEL; +xf86InitValuatorAxisStruct(device, + pEvdev-rel_axis_map[idx], + atoms[pEvdev-rel_axis_map[idx]], + NO_AXIS_LIMITS, NO_AXIS_LIMITS, + 0, 0, 0, Relative); +SetScrollValuator(device, pEvdev-rel_axis_map[idx], + SCROLL_TYPE_HORIZONTAL, 1.0, + SCROLL_FLAG_NONE); +} + +if (EvdevBitIsSet(pEvdev-rel_bitmask, REL_DIAL)) +{ +idx = REL_DIAL; +xf86InitValuatorAxisStruct(device, + pEvdev-rel_axis_map[idx], + atoms[pEvdev-rel_axis_map[idx]], + NO_AXIS_LIMITS, NO_AXIS_LIMITS, +
Re: [PATCH:xev 2/2] Use strncasecmp if available, instead of a tolower loop strncmp
On Mon, Jan 14, 2013 at 11:29:46PM -0800, Alan Coopersmith wrote: Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- configure.ac |3 +++ xev.c| 12 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0af7b2d..6016d62 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,7 @@ AC_INIT([xev], [1.2.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xev]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) +AC_USE_SYSTEM_EXTENSIONS # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) @@ -37,6 +38,8 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS +AC_CHECK_FUNCS([strncasecmp]) + # Checks for pkg-config packages PKG_CHECK_MODULES(XEV, [xrandr = 1.2 x11 xproto = 7.0.17]) diff --git a/xev.c b/xev.c index 34a46aa..298c5c1 100644 --- a/xev.c +++ b/xev.c @@ -32,6 +32,9 @@ from the X Consortium. * Author: Jim Fulton, MIT X Consortium */ +#ifdef HAVE_CONFIG_H +# include config.h +#endif #include stdio.h #include stdlib.h #include ctype.h @@ -907,16 +910,19 @@ static int parse_backing_store (char *s) { size_t len = strlen (s); +#ifndef HAVE_STRNCASECMP char *cp; for (cp = s; *cp; cp++) { if (isascii (*cp) isupper (*cp)) *cp = tolower (*cp); } +#define strncasecmp strncmp +#endif -if (strncmp (s, notuseful, len) == 0) return (NotUseful); -if (strncmp (s, whenmapped, len) == 0) return (WhenMapped); -if (strncmp (s, always, len) == 0) return (Always); +if (strncasecmp (s, notuseful, len) == 0) return (NotUseful); +if (strncasecmp (s, whenmapped, len) == 0) return (WhenMapped); +if (strncasecmp (s, always, len) == 0) return (Always); which systems do we support that don't have strncasecmp? the man page suggests uppercase spelling -bs {NotUseful,WhenMapped,Always} so this could break on those systems. maybe change the above to match the spelling in the man page? either way, both Reviewed-by: Peter Hutterer peter.hutte...@who-t.net Cheers, Peter usage (); } -- 1.7.9.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xev 2/2] Use strncasecmp if available, instead of a tolower loop strncmp
On 01/15/13 03:51 PM, Peter Hutterer wrote: +#ifndef HAVE_STRNCASECMP char *cp; for (cp = s; *cp; cp++) { if (isascii (*cp) isupper (*cp)) *cp = tolower (*cp); } +#define strncasecmp strncmp +#endif -if (strncmp (s, notuseful, len) == 0) return (NotUseful); -if (strncmp (s, whenmapped, len) == 0) return (WhenMapped); -if (strncmp (s, always, len) == 0) return (Always); +if (strncasecmp (s, notuseful, len) == 0) return (NotUseful); +if (strncasecmp (s, whenmapped, len) == 0) return (WhenMapped); +if (strncasecmp (s, always, len) == 0) return (Always); which systems do we support that don't have strncasecmp? Good question - I remembered other Xorg configure scripts checking for it, but I don't know why, and checking the Unix98 spec it was included there: http://pubs.opengroup.org/onlinepubs/007908799/xsh/strcasecmp.html so it should be in our supported baseline. Anyone know of any reason we can't just assume strncasecmp and drop the #ifndef case above? the man page suggests uppercase spelling -bs {NotUseful,WhenMapped,Always} so this could break on those systems. maybe change the above to match the spelling in the man page? How would it break? They'd use the old code that does tolower on the input before comparison - if we require strncasecmp and drop support for them, then we could uppercase with impunity. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH:xev 2/2] Use strncasecmp if available, instead of a tolower loop strncmp
On Tue, Jan 15, 2013 at 04:07:58PM -0800, Alan Coopersmith wrote: On 01/15/13 03:51 PM, Peter Hutterer wrote: +#ifndef HAVE_STRNCASECMP char *cp; for (cp = s; *cp; cp++) { if (isascii (*cp) isupper (*cp)) *cp = tolower (*cp); } +#define strncasecmp strncmp +#endif -if (strncmp (s, notuseful, len) == 0) return (NotUseful); -if (strncmp (s, whenmapped, len) == 0) return (WhenMapped); -if (strncmp (s, always, len) == 0) return (Always); +if (strncasecmp (s, notuseful, len) == 0) return (NotUseful); +if (strncasecmp (s, whenmapped, len) == 0) return (WhenMapped); +if (strncasecmp (s, always, len) == 0) return (Always); which systems do we support that don't have strncasecmp? Good question - I remembered other Xorg configure scripts checking for it, but I don't know why, and checking the Unix98 spec it was included there: http://pubs.opengroup.org/onlinepubs/007908799/xsh/strcasecmp.html so it should be in our supported baseline. Anyone know of any reason we can't just assume strncasecmp and drop the #ifndef case above? the man page suggests uppercase spelling -bs {NotUseful,WhenMapped,Always} so this could break on those systems. maybe change the above to match the spelling in the man page? How would it break? They'd use the old code that does tolower on the input before comparison - if we require strncasecmp and drop support for them, then we could uppercase with impunity. oh, sorry, misread. I thought that the tolower hunk was removed. I need to sleep more. Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH libX11 1/2] nls/Makefile.am: Remove unneeded $(srcdir)
On 13-01-15 04:07 PM, Quentin Glidic wrote: Signed-off-by: Quentin Glidic sardemff7+...@sardemff7.net --- nls/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nls/Makefile.am b/nls/Makefile.am index 0eced4c..bef2d2b 100644 --- a/nls/Makefile.am +++ b/nls/Makefile.am @@ -38,7 +38,7 @@ locale.dir: locale.dir.pre if HAVE_PERL TESTS_ENVIRONMENT = $(PERL) -TESTS = $(srcdir)/compose-check.pl +TESTS = compose-check.pl endif HAVE_PERL Works with Automake 1.11. The check script code tests for the presence of the perl script and appends srcdir if needed. Only when we run a script manually in the makefile do we need to specify srcdir to support out-of-source build tree. Reviewed-by: Gaetan Nadonmems...@videotron.ca ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH:libXfont] Replace deprecated Automake INCLUDES variable with AM_CPPFLAGS
Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html - Support for the long-deprecated INCLUDES variable will be removed altogether in Automake 1.14. The AM_CPPFLAGS variable should be used instead. This variable was deprecated in Automake releases prior to 1.10, which is the current minimum level required to build X. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com --- src/FreeType/Makefile.am |6 +++--- src/bitmap/Makefile.am |2 +- src/builtins/Makefile.am |2 +- src/fc/Makefile.am |2 +- src/fontfile/Makefile.am |2 +- src/stubs/Makefile.am|2 +- src/util/Makefile.am |2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/FreeType/Makefile.am b/src/FreeType/Makefile.am index fa45da1..ab60ffa 100644 --- a/src/FreeType/Makefile.am +++ b/src/FreeType/Makefile.am @@ -1,10 +1,10 @@ -INCLUDES =\ +AM_CPPFLAGS = \ -I${top_srcdir}/include -noinst_LTLIBRARIES = libft.la - AM_CFLAGS = $(FREETYPE_CFLAGS) $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) +noinst_LTLIBRARIES = libft.la + libft_la_SOURCES = \ ft.h\ ftfuncs.h \ diff --git a/src/bitmap/Makefile.am b/src/bitmap/Makefile.am index b5b9674..99682d9 100644 --- a/src/bitmap/Makefile.am +++ b/src/bitmap/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) diff --git a/src/builtins/Makefile.am b/src/builtins/Makefile.am index b203fda..6b96410 100644 --- a/src/builtins/Makefile.am +++ b/src/builtins/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include \ -I${top_srcdir}/src/bitmap diff --git a/src/fc/Makefile.am b/src/fc/Makefile.am index 3bfd231..c180cae 100644 --- a/src/fc/Makefile.am +++ b/src/fc/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) diff --git a/src/fontfile/Makefile.am b/src/fontfile/Makefile.am index aa64ca5..ab54cfd 100644 --- a/src/fontfile/Makefile.am +++ b/src/fontfile/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = -I${top_srcdir}/include +AM_CPPFLAGS = -I${top_srcdir}/include AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) diff --git a/src/stubs/Makefile.am b/src/stubs/Makefile.am index 86dd8fc..23e3bd1 100644 --- a/src/stubs/Makefile.am +++ b/src/stubs/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include AM_CFLAGS = $(XFONT_CFLAGS) $(OS_CFLAGS) $(CWARNFLAGS) diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 055fc9d..32a8f37 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I${top_srcdir}/include \ -I$(top_srcdir)/src/stubs -- 1.7.9.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] dix: support the transformation matrix for relative devices.
The transformation matrix we previously stored was a scaled matrix based on the axis ranges of the device. For relative movements, the scaling is not required (or desired). Store two separate matrices, one as requested by the client, one as the product of [scale . matrix . inv_scale]. Depending on the type of movement, apply the respective matrix. For relative movements, also drop the translation component since it doesn't really make sense to use that bit. This changes the DeviceIntRec ABI Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- Biggest issue here: we drop the translation for relative events because it just doesn't make sense. Realistically, the matrix on relative devices is likely only used for rotation, but if a device has a matrix set with a scaling component (because it is mapped to a screen) that component will apply to relative events as well. the two options here: 1) make the relative matrix completely independent of the normal matrix 2) rely on clients to update the matrix if they switch the device from one mode into anther. I'm tempted to say 2) but I do wonder if there are corner cases where this will break. Note: I sent this patch out in june 2011, but we didn't have a few of the things in place that we have now (specifically - valuator masks with doubles). http://lists.x.org/archives/xorg-devel/2011-June/022952.html This patch is largely the same, with a few minor changes only. dix/devices.c | 4 ++-- dix/getevents.c| 30 +- include/inputstr.h | 5 - 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 3c7d480..e51ebaf 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -124,14 +124,14 @@ DeviceSetTransform(DeviceIntPtr dev, float *transform) for (x = 0; x 3; x++) dev-transform.m[y][x] = *transform++; -pixman_f_transform_multiply(dev-transform, scale, dev-transform); +pixman_f_transform_multiply(dev-scale_and_transform, scale, dev-transform); /* scale */ pixman_f_transform_init_scale(scale, 1.0 / sx, 1.0 / sy); scale.m[0][2] = -dev-valuator-axes[0].min_value / sx; scale.m[1][2] = -dev-valuator-axes[1].min_value / sy; -pixman_f_transform_multiply(dev-transform, dev-transform, scale); +pixman_f_transform_multiply(dev-scale_and_transform, dev-scale_and_transform, scale); } /** diff --git a/dix/getevents.c b/dix/getevents.c index 3d41e1e..75504e3 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1174,6 +1174,32 @@ transform(struct pixman_f_transform *m, double *x, double *y) *y = p.v[1]; } +static void +transformRelative(DeviceIntPtr dev, ValuatorMask *mask) +{ +double x = 0, y = 0; +struct pixman_f_transform rotation_only = dev-transform; + +/* drop the translation component for rel movements */ +rotation_only.m[0][2] = 0; +rotation_only.m[1][2] = 0; + +valuator_mask_fetch_double(mask, 0, x); +valuator_mask_fetch_double(mask, 1, y); + +transform(rotation_only, x, y); + +if (x) +valuator_mask_set_double(mask, 0, x); +else +valuator_mask_unset(mask, 0); + +if (y) +valuator_mask_set_double(mask, 1, y); +else +valuator_mask_unset(mask, 1); +} + /** * Apply the device's transformation matrix to the valuator mask and replace * the scaled values in mask. This transformation only applies to valuators @@ -1214,7 +1240,7 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask) if (valuator_mask_isset(mask, 1)) oy = y = valuator_mask_get_double(mask, 1); -transform(dev-transform, x, y); +transform(dev-scale_and_transform, x, y); if (valuator_mask_isset(mask, 0) || ox != x) valuator_mask_set_double(mask, 0, x); @@ -1375,6 +1401,8 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, set_raw_valuators(raw, mask, raw-valuators.data); } else { +transformRelative(pDev, mask); + if (flags POINTER_ACCELERATE) accelPointer(pDev, mask, ms); if ((flags POINTER_NORAW) == 0) diff --git a/include/inputstr.h b/include/inputstr.h index 17cee98..4f42507 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -586,8 +586,11 @@ typedef struct _DeviceIntRec { XIPropertyHandlerPtr handlers; /* NULL-terminated */ } properties; -/* coordinate transformation matrix for absolute input devices */ +/* coordinate transformation matrix */ struct pixman_f_transform transform; +/* scale matrix for absolute devices, this is the combined matrix of + [1/scale] . [transform] . [scale]. See DeviceSetTransform */ +struct pixman_f_transform scale_and_transform; /* XTest related master device id */ int xtest_master_id; -- 1.8.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: