# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/xf86-input-aiptek/up-next-hotfix.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- diff --git a/configure.ac b/configure.ac index 5081dd2..60dd6bd 100644 --- a/configure.ac +++ b/configure.ac @@ -67,6 +67,14 @@ AC_SUBST(inputdir) DRIVER_NAME=aiptek AC_SUBST([DRIVER_NAME]) +AC_MSG_WARN([ + *************************************************************************** + This driver is umaintained, untested and may not build. + Any fixes to this driver will only be applied if you have a device and you + can test patches. See + http://lists.freedesktop.org/archives/xorg-devel/2011-September/025336.html + ***************************************************************************]) + AC_CONFIG_FILES([Makefile man/Makefile src/Makefile]) diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c index a68814f..78532e4 100644 --- a/src/xf86Aiptek.c +++ b/src/xf86Aiptek.c @@ -293,13 +293,19 @@ xf86AiptekSendEvents(InputInfoPtr pInfo, int r_z) */ /* Keyboard 'make' (press) event */ - xf86PostKeyEvent(pInfo->dev, i+8, TRUE, - bAbsolute, 0, 5, - x, y, common->currentValues.button, xTilt, yTilt); + xf86PostKeyEvent(pInfo->dev, i+8, TRUE +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 22 + , bAbsolute, 0, 5, + x, y, common->currentValues.button, xTilt, yTilt +#endif + ); /* Keyboard 'break' (depress) event */ - xf86PostKeyEvent(pInfo->dev, i+8, FALSE, - bAbsolute, 0, 5, - x, y, common->currentValues.button, xTilt, yTilt); + xf86PostKeyEvent(pInfo->dev, i+8, FALSE +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 22 + , bAbsolute, 0, 5, + x, y, common->currentValues.button, xTilt, yTilt +#endif + ); break; } } @@ -926,6 +932,7 @@ xf86AiptekHIDOpen(InputInfoPtr pInfo) { xf86Msg(X_ERROR, "xf86AiptekHIDOpen ERROR: %d\n", err); SYSCALL(close(pInfo->fd)); + pInfo->fd = -1; return !Success; } @@ -1507,7 +1514,7 @@ xf86AiptekProc(DeviceIntPtr pAiptek, int requestCode) default: { xf86Msg(X_ERROR, "xf86AiptekProc - Unsupported mode=%d\n", requestCode); - return !Success; + return BadValue; } break; } @@ -1829,7 +1836,7 @@ xf86AiptekInit(InputDriverPtr drv, xf86Msg(X_INFO, "xf86AiptekInit(): begins\n"); /* Type */ - s = xf86FindOptionValue(pInfo->options, "Type"); + s = xf86SetStrOption(pInfo->options, "Type", NULL); if (s && (xf86NameCmp(s, "stylus") == 0)) { rc = xf86AiptekAllocateStylus(pInfo); @@ -1916,7 +1923,8 @@ xf86AiptekInit(InputDriverPtr drv, */ if ( shared == 0) { - xf86AiptekHIDOpen(pInfo); + if (xf86AiptekHIDOpen(pInfo) != Success) + goto SetupProc_fail; close(pInfo->fd); pInfo->fd=-1; } @@ -2219,12 +2227,6 @@ xf86AiptekInit(InputDriverPtr drv, return Success; SetupProc_fail: - if (common) - free(common); - if (device) - free(device); - if (pInfo) - free(pInfo); return BadValue; }