diff options
-rw-r--r-- | .SRCINFO | 46 | ||||
-rw-r--r-- | 0001-implement-trackpoint-wheel-emulation.patch | 313 | ||||
-rw-r--r-- | 0004-disable-clickpad_guess_clickfingers.patch | 27 | ||||
-rw-r--r-- | 0006-add-synatics-files-into-Makefile.am.patch | 30 | ||||
-rw-r--r-- | 90-evdev-trackpoint.conf | 22 | ||||
-rw-r--r-- | PKGBUILD | 65 | ||||
-rw-r--r-- | xf86-input-evdev-trackpoint.install | 6 |
7 files changed, 509 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dd7fce7a54cf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,46 @@ +# Generated by makepkg 4.2.0-51-gf1e01-dirty +# Sat Apr 11 20:08:54 UTC 2015 +pkgbase = xf86-input-evdev-trackpoint + pkgdesc = X.org evdev input driver for trackpoint with clickpad + pkgver = 2.9.2 + pkgrel = 1 + url = http://xorg.freedesktop.org/ + install = xf86-input-evdev-trackpoint.install + arch = i686 + arch = x86_64 + license = custom + makedepends = xorg-server-devel + makedepends = resourceproto + makedepends = scrnsaverproto + makedepends = libxi + makedepends = libx11 + makedepends = X-ABI-XINPUT_VERSION>=19 + makedepends = autoconf + depends = glibc + depends = systemd + depends = mtdev + depends = libxtst + depends = libevdev + provides = xf86-input-evdev + conflicts = xorg-server<1.14.0 + conflicts = X-ABI-XINPUT_VERSION<19 + conflicts = X-ABI-XINPUT_VERSION>=22 + conflicts = xf86-input-evdev + replaces = xf86-input-evdev + options = !makeflags + backup = etc/X11/xorg.conf.d/90-evdev-trackpoint.conf + source = http://xorg.freedesktop.org//releases/individual/driver/xf86-input-evdev-2.9.2.tar.bz2 + source = http://xorg.freedesktop.org//releases/individual/driver/xf86-input-synaptics-1.8.2.tar.bz2 + source = 0001-implement-trackpoint-wheel-emulation.patch + source = 0004-disable-clickpad_guess_clickfingers.patch + source = 0006-add-synatics-files-into-Makefile.am.patch + source = 90-evdev-trackpoint.conf + sha256sums = 792329b531afc6928ccda94e4b51a5520d4ddf8ef9a00890a5d0d31898acefec + sha256sums = 7b0e164ebd02a680e0c695955e783059f37edb0c2656398e0a972adc8e698c80 + sha256sums = 1df30c030522d48dd1a134f9cf3acb44876950836b80eb56436414d6fd062d34 + sha256sums = 74c508e1173254af8e4a851bf05762a1cd7dc194079b875ea0226913297db362 + sha256sums = 9fc80868f6fae1c41a4d31bd77daa5d4e8832628c7e4e13f9645647bdd01b0f8 + sha256sums = 2278cb9b452524cc3fe17071efa2d5b5c8064628b440997fdfa7f999dbf29b62 + +pkgname = xf86-input-evdev-trackpoint + diff --git a/0001-implement-trackpoint-wheel-emulation.patch b/0001-implement-trackpoint-wheel-emulation.patch new file mode 100644 index 000000000000..da1795d50268 --- /dev/null +++ b/0001-implement-trackpoint-wheel-emulation.patch @@ -0,0 +1,313 @@ +From 3a5ea080e77dd6b77d18eff51121e48ee97d09b3 Mon Sep 17 00:00:00 2001 +From: Taegil Bae <esrevinu@gmail.com> +Date: Thu, 12 Dec 2013 20:52:48 +0900 +Subject: [PATCH 1/6] implement trackpoint wheel emulation + +--- + src/evdev.c | 33 ++++++++++++++++++++++++++- + src/evdev.h | 2 ++ + src/synaptics.c | 66 ++++++++++++++++++++++++++++++++++++------------------ + src/synapticsstr.h | 1 + + src/synproto.c | 2 +- + src/synproto.h | 4 ++++ + 6 files changed, 84 insertions(+), 24 deletions(-) + +diff --git a/src/evdev.c b/src/evdev.c +index 30f809b..d860836 100644 +--- a/src/evdev.c ++++ b/src/evdev.c +@@ -115,6 +115,9 @@ static int proximity_bits[] = { + BTN_TOOL_LENS, + }; + ++int SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); ++void SynapticsUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); ++ + static int EvdevOn(DeviceIntPtr); + static int EvdevCache(InputInfoPtr pInfo); + static void EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl); +@@ -141,6 +144,8 @@ static Atom prop_device; + static Atom prop_virtual; + static Atom prop_scroll_dist; + ++InputInfoPtr trackpoint = NULL; ++ + static int EvdevSwitchMode(ClientPtr client, DeviceIntPtr device, int mode) + { + InputInfoPtr pInfo; +@@ -969,7 +974,7 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v, + * Take the synchronization input event and process it accordingly; the motion + * notify events are sent first, then any button/key press/release events. + */ +-static void ++void + EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev) + { + int i; +@@ -2510,6 +2515,11 @@ static void + EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { + EvdevPtr pEvdev = pInfo ? pInfo->private : NULL; ++ ++ /* Synaptics */ ++ if (pEvdev->isSynaptics) ++ return SynapticsUnInit(drv, pInfo, flags); ++ + if (pEvdev) + { + /* Release string allocated in EvdevOpenDevice. */ +@@ -2521,6 +2531,12 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + + libevdev_free(pEvdev->dev); + } ++ ++ /* TrackPoint */ ++ if (strstr(pInfo->name, "TrackPoint")) { ++ trackpoint = NULL; ++ } ++ + xf86DeleteInput(pInfo, flags); + } + +@@ -2559,6 +2575,9 @@ EvdevAlloc(InputInfoPtr pInfo) + pEvdev->rel_axis_map[1] = 1; + + pEvdev->type_name = NULL; ++ ++ /* Synaptics */ ++ pEvdev->isSynaptics = 0; + + return pEvdev; + } +@@ -2577,6 +2596,11 @@ EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + pInfo->device_control = EvdevProc; + pInfo->read_input = EvdevReadInput; + pInfo->switch_mode = EvdevSwitchMode; ++ ++ /* TrackPoint */ ++ if (strstr(pInfo->name, "TrackPoint")) { ++ trackpoint = pInfo; ++ } + + rc = EvdevOpenDevice(pInfo); + if (rc != Success) +@@ -2604,6 +2628,13 @@ EvdevPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + rc = BadMatch; + goto error; + } ++ ++ /* Synaptics */ ++ if (pEvdev->flags & EVDEV_TOUCHPAD) { ++ free(pInfo->private); ++ pInfo->private = NULL; ++ return SynapticsPreInit(drv, pInfo, flags); ++ } + + /* Overwrite type_name with custom-defined one (#62831). + Note: pInfo->type_name isn't freed so we need to manually do this +diff --git a/src/evdev.h b/src/evdev.h +index 520d017..341fd91 100644 +--- a/src/evdev.h ++++ b/src/evdev.h +@@ -152,6 +152,8 @@ typedef struct { + } EventQueueRec, *EventQueuePtr; + + typedef struct { ++ int isSynaptics; ++ + struct libevdev *dev; + + char *device; +diff --git a/src/synaptics.c b/src/synaptics.c +index b25c902..aa7725d 100644 +--- a/src/synaptics.c ++++ b/src/synaptics.c +@@ -1,20 +1,20 @@ + /* +- * Copyright © 1999 Henry Davies +- * Copyright © 2001 Stefan Gmeiner +- * Copyright © 2002 S. Lehner +- * Copyright © 2002 Peter Osterlund +- * Copyright © 2002 Linuxcare Inc. David Kennedy +- * Copyright © 2003 Hartwig Felger +- * Copyright © 2003 Jörg Bösner +- * Copyright © 2003 Fred Hucht +- * Copyright © 2004 Alexei Gilchrist +- * Copyright © 2004 Matthias Ihmig +- * Copyright © 2006 Stefan Bethge +- * Copyright © 2006 Christian Thaeter +- * Copyright © 2007 Joseph P. Skudlarek +- * Copyright © 2008 Fedor P. Goncharov +- * Copyright © 2008-2012 Red Hat, Inc. +- * Copyright © 2011 The Chromium OS Authors ++ * Copyright © 1999 Henry Davies ++ * Copyright © 2001 Stefan Gmeiner ++ * Copyright © 2002 S. Lehner ++ * Copyright © 2002 Peter Osterlund ++ * Copyright © 2002 Linuxcare Inc. David Kennedy ++ * Copyright © 2003 Hartwig Felger ++ * Copyright © 2003 Jörg Bösner ++ * Copyright © 2003 Fred Hucht ++ * Copyright © 2004 Alexei Gilchrist ++ * Copyright © 2004 Matthias Ihmig ++ * Copyright © 2006 Stefan Bethge ++ * Copyright © 2006 Christian Thaeter ++ * Copyright © 2007 Joseph P. Skudlarek ++ * Copyright © 2008 Fedor P. Goncharov ++ * Copyright © 2008-2012 Red Hat, Inc. ++ * Copyright © 2011 The Chromium OS Authors + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without +@@ -41,7 +41,7 @@ + * Stefan Bethge <stefan.bethge@web.de> + * Matthias Ihmig <m.ihmig@gmx.net> + * Alexei Gilchrist <alexei@physics.uq.edu.au> +- * Jörg Bösner <ich@joerg-boesner.de> ++ * Jörg Bösner <ich@joerg-boesner.de> + * Hartwig Felger <hgfelger@hgfelger.de> + * Peter Osterlund <petero2@telia.com> + * S. Lehner <sam_x@bluemail.ch> +@@ -59,6 +59,8 @@ + #include "config.h" + #endif + ++#define BUILD_EVENTCOMM 1 ++ + #include <xorg-server.h> + #include <unistd.h> + #include <misc.h> +@@ -77,6 +79,12 @@ + #include "synapticsstr.h" + #include "synaptics-properties.h" + ++extern InputInfoPtr trackpoint; ++extern BOOL ++EvdevWheelEmuFilterButton(InputInfoPtr pInfo, unsigned int button, int value); ++void ++EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev); ++ + enum EdgeType { + NO_EDGE = 0, + BOTTOM_EDGE = 1, +@@ -119,8 +127,8 @@ enum EdgeType { + /***************************************************************************** + * Forward declaration + ****************************************************************************/ +-static int SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); +-static void SynapticsUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); ++int SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); ++void SynapticsUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); + static Bool DeviceControl(DeviceIntPtr, int); + static void ReadInput(InputInfoPtr); + static int HandleState(InputInfoPtr, struct SynapticsHwState *, CARD32 now, +@@ -834,7 +842,7 @@ SynapticsAccelerationProfile(DeviceIntPtr dev, + return accelfct; + } + +-static int ++int + SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { + SynapticsPrivate *priv; +@@ -850,6 +858,8 @@ SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + pInfo->control_proc = ControlProc; + pInfo->switch_mode = SwitchMode; + pInfo->private = priv; ++ ++ priv->isSynaptics = 1; + + /* allocate now so we don't allocate in the signal handler */ + priv->timer = TimerSet(NULL, 0, 0, NULL, NULL); +@@ -929,7 +939,7 @@ SynapticsPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + /* + * Uninitialize the device. + */ +-static void ++void + SynapticsUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) + { + SynapticsPrivate *priv = ((SynapticsPrivate *) pInfo->private); +@@ -2787,7 +2797,9 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw, + * the soft button instead. */ + if (para->clickpad) { + /* hw->left is down, but no other buttons were already down */ +- if (!(priv->lastButtons & 7) && hw->left && !hw->right && !hw->middle) { ++ if (!(priv->lastButtons & 7) && ++ hw->left && !hw->right && !hw->middle && ++ !hw->trackpoint_middle) { + /* If the finger down event is delayed, the x and y + * coordinates are stale so we delay processing the click */ + if (hw->z < para->finger_low) { +@@ -2805,6 +2817,11 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw, + else if (is_inside_middlebutton_area(para, hw->x, hw->y)) { + hw->left = 0; + hw->middle = 1; ++ if (trackpoint) { ++ hw->middle = 0; ++ hw->trackpoint_middle = 1; ++ EvdevWheelEmuFilterButton(trackpoint, 2, 1); ++ } + } + else if (is_inside_sec_middlebutton_area(para, hw->x, hw->y)) { + hw->left = 0; +@@ -2817,6 +2834,11 @@ update_hw_button_state(const InputInfoPtr pInfo, struct SynapticsHwState *hw, + hw->middle = (priv->lastButtons & 2) ? 1 : 0; + hw->right = (priv->lastButtons & 4) ? 1 : 0; + } ++ else if (hw->trackpoint_middle) { ++ hw->trackpoint_middle = 0; ++ EvdevWheelEmuFilterButton(trackpoint, 2, 0); ++ EvdevProcessSyncEvent(trackpoint, NULL); ++ } + } + + /* Fingers emulate other buttons. ClickFinger can only be +diff --git a/src/synapticsstr.h b/src/synapticsstr.h +index 4bd32ac..1ca02ac 100644 +--- a/src/synapticsstr.h ++++ b/src/synapticsstr.h +@@ -229,6 +229,7 @@ typedef struct _SynapticsParameters { + } SynapticsParameters; + + struct _SynapticsPrivateRec { ++ int isSynaptics; + SynapticsParameters synpara; /* Default parameter settings, read from + the X config file */ + struct SynapticsProtocolOperations *proto_ops; +diff --git a/src/synproto.c b/src/synproto.c +index 91e20e6..143160c 100644 +--- a/src/synproto.c ++++ b/src/synproto.c +@@ -1,5 +1,5 @@ + /* +- * Copyright © 2012 Canonical, Ltd. ++ * Copyright © 2012 Canonical, Ltd. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), +diff --git a/src/synproto.h b/src/synproto.h +index c52838c..3ba3617 100644 +--- a/src/synproto.h ++++ b/src/synproto.h +@@ -31,6 +31,8 @@ + #include "config.h" + #endif + ++#define BUILD_EVENTCOMM 1 ++ + #include <unistd.h> + #include <sys/ioctl.h> + #include <xf86Xinput.h> +@@ -74,6 +76,8 @@ struct SynapticsHwState { + + Bool multi[8]; + Bool middle; /* Some ALPS touchpads have a middle button */ ++ ++ Bool trackpoint_middle; + + int num_mt_mask; + ValuatorMask **mt_mask; +-- +1.9.3 + diff --git a/0004-disable-clickpad_guess_clickfingers.patch b/0004-disable-clickpad_guess_clickfingers.patch new file mode 100644 index 000000000000..19081d7b43be --- /dev/null +++ b/0004-disable-clickpad_guess_clickfingers.patch @@ -0,0 +1,27 @@ +From 1fc018e412aea7f1f120342bbc9625a64d8bc4e9 Mon Sep 17 00:00:00 2001 +From: Taegil Bae <esrevinu@gmail.com> +Date: Sun, 19 Jan 2014 19:08:17 +0900 +Subject: [PATCH 4/6] disable clickpad_guess_clickfingers + +--- + src/synaptics.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/synaptics.c b/src/synaptics.c +index aa7725d..07581eb 100644 +--- a/src/synaptics.c ++++ b/src/synaptics.c +@@ -2710,8 +2710,10 @@ handle_clickfinger(SynapticsPrivate * priv, struct SynapticsHwState *hw) + * three fingers down: F3_CLICK + */ + ++ /* + if (para->clickpad) + nfingers = clickpad_guess_clickfingers(priv, hw); ++ */ + + switch (nfingers) { + case 1: +-- +1.9.3 + diff --git a/0006-add-synatics-files-into-Makefile.am.patch b/0006-add-synatics-files-into-Makefile.am.patch new file mode 100644 index 000000000000..8a324c298a9d --- /dev/null +++ b/0006-add-synatics-files-into-Makefile.am.patch @@ -0,0 +1,30 @@ +From c3611342ce86d4d94c8e7f1ec4dae69ad45b86ea Mon Sep 17 00:00:00 2001 +From: Taegil Bae <esrevinu@gmail.com> +Date: Sat, 22 Feb 2014 22:08:17 +0900 +Subject: [PATCH 6/6] add synatics' files into Makefile.am + +--- + src/Makefile.am | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 5e0c3b3..5b83982 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -40,5 +40,12 @@ AM_CPPFLAGS =-I$(top_srcdir)/include $(LIBEVDEV_CFLAGS) + emuWheel.c \ + draglock.c \ + apple.c \ +- axis_labels.h ++ axis_labels.h \ ++ eventcomm.c \ ++ eventcomm.h \ ++ properties.c \ ++ synaptics.c \ ++ synapticsstr.h \ ++ synproto.c \ ++ synproto.h + +-- +1.9.3 + diff --git a/90-evdev-trackpoint.conf b/90-evdev-trackpoint.conf new file mode 100644 index 000000000000..690e4bf5fc2c --- /dev/null +++ b/90-evdev-trackpoint.conf @@ -0,0 +1,22 @@ +Section "InputClass" + Identifier "Clickpad" + MatchIsTouchpad "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" + # Synaptics options come here. + Option "TapButton1" "1" + Option "TapButton2" "3" + Option "TapButton3" "2" + Option "SoftButtonAreas" "60% 0 0 40% 40% 60% 0 40%" + Option "AreaTopEdge" "40%" + Option "AreaBottomEdge" "0" +EndSection + +Section "InputClass" + Identifier "TrackPoint" + MatchProduct "TrackPoint" + MatchDriver "evdev" + Option "EmulateWheel" "1" + Option "EmulateWheelButton" "2" + Option "XAxisMapping" "6 7" +EndSection diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4889da3dfe5c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,65 @@ +# Maintainer: Taegil Bae <esrevinu@gmail.com> +# Contributor: Jan de Groot <jgc@archlinux.org> +# Contributor: Alexander Baldeck <Alexander@archlinux.org + +_pkgname=xf86-input-evdev +pkgname=${_pkgname}-trackpoint +pkgver=2.9.2 +pkgrel=1 +_pkgname2=xf86-input-synaptics +_pkgver2=1.8.2 +pkgdesc="X.org evdev input driver for trackpoint with clickpad" +arch=(i686 x86_64) +url="http://xorg.freedesktop.org/" +license=('custom') +depends=('glibc' 'systemd' 'mtdev' 'libxtst' 'libevdev') +makedepends=('xorg-server-devel' 'resourceproto' 'scrnsaverproto' 'libxi' 'libx11' 'X-ABI-XINPUT_VERSION>=19' 'autoconf') +conflicts=('xorg-server<1.14.0' 'X-ABI-XINPUT_VERSION<19' 'X-ABI-XINPUT_VERSION>=22' 'xf86-input-evdev') +replaces=("${_pkgname}") +provides=("${_pkgname}") +options=('!makeflags') +backup=('etc/X11/xorg.conf.d/90-evdev-trackpoint.conf') +source=(${url}/releases/individual/driver/${_pkgname}-${pkgver}.tar.bz2 + ${url}/releases/individual/driver/${_pkgname2}-${_pkgver2}.tar.bz2 + 0001-implement-trackpoint-wheel-emulation.patch + 0004-disable-clickpad_guess_clickfingers.patch + 0006-add-synatics-files-into-Makefile.am.patch + 90-evdev-trackpoint.conf) +sha256sums=('792329b531afc6928ccda94e4b51a5520d4ddf8ef9a00890a5d0d31898acefec' + '7b0e164ebd02a680e0c695955e783059f37edb0c2656398e0a972adc8e698c80' + '1df30c030522d48dd1a134f9cf3acb44876950836b80eb56436414d6fd062d34' + '74c508e1173254af8e4a851bf05762a1cd7dc194079b875ea0226913297db362' + '9fc80868f6fae1c41a4d31bd77daa5d4e8832628c7e4e13f9645647bdd01b0f8' + '2278cb9b452524cc3fe17071efa2d5b5c8064628b440997fdfa7f999dbf29b62') +install=xf86-input-evdev-trackpoint.install + +prepare() { + synaptics_srcdir=${srcdir}/${_pkgname2}-${_pkgver2} + + cd "${srcdir}/${_pkgname}-${pkgver}" + + cp ${synaptics_srcdir}/src/{eventcomm.c,eventcomm.h,properties.c,\ +synaptics.c,synapticsstr.h,synproto.c,synproto.h} src/ + cp ${synaptics_srcdir}/include/synaptics-properties.h include/ + + patch -p1 -i ../0001-implement-trackpoint-wheel-emulation.patch + patch -p1 -i ../0004-disable-clickpad_guess_clickfingers.patch + patch -p1 -i ../0006-add-synatics-files-into-Makefile.am.patch +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + autoreconf -i + ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" + install -m755 -d "${pkgdir}/etc/X11/xorg.conf.d" + install -m644 ${srcdir}/90-evdev-trackpoint.conf "${pkgdir}/etc/X11/xorg.conf.d/" +} diff --git a/xf86-input-evdev-trackpoint.install b/xf86-input-evdev-trackpoint.install new file mode 100644 index 000000000000..2dd3968f97b4 --- /dev/null +++ b/xf86-input-evdev-trackpoint.install @@ -0,0 +1,6 @@ +post_install() { + echo "This is for laptops with trackpoint and clickpad." + echo "In the default settings, the upper 40% area of touchpad will work as trackpoint button." + echo "The lower area will work as touchpad as it is." +} + |