summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* wacom 0.99.2xf86-input-wacom-0.99.2Peter Hutterer2022-02-082-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* configure.ac: require C99Peter Hutterer2022-02-071-0/+2
| | | | | | | Because it is... checks year... 2022 and c99 is not exactly modern anymore anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* xsetwacom: shut up two compiler warningsPeter Hutterer2022-02-071-4/+3
| | | | | | There's more, but let's silence some of them at least Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: use dep.get_variable() instead of the deprecated onePeter Hutterer2022-02-071-3/+3
| | | | | | | NOTICE: Future-deprecated features used: * 0.56.0: {'Dependency.get_pkgconfig_variable'} Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Update configure.ac to point to our issue tracker if a unit test failsJason Gerecke2022-02-041-1/+1
| | | | Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* test: Enforce "zero minimum" workaround only for touch deviceJason Gerecke2022-02-041-5/+9
| | | | | | | | The codepath for pen/eraser devices is capable of using the minimum values. Move the code to enforce a a minimum value of zero to the touch portion of the function where it applies. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* tools: switch the xsetwacom tests to use the new test suite approach tooPeter Hutterer2022-02-043-16/+16
| | | | | | | Note that this removes the xsetwacom tests from the autotools build, this is meson only now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: fix long-standing typo in the initial size testsPeter Hutterer2022-02-041-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: add a test for the convertAxes helperPeter Hutterer2022-02-041-0/+84
| | | | | | See #222 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Replace our unit-test suite with something more magic and easierPeter Hutterer2022-02-0414-1187/+833
| | | | | | | | | | | | | | | | | | | | | The previous approach, written 11 years ago, relied on providing all symbols the driver needs as stubs (see fake-symbols.c). Most of these symbols just needed to be there so we could compile the test, they didn't actually get utilized by the tests. Dropping this and instead add something roughly similar to Rust: the test function can be in the same file as the source function. The TEST_CASE() macro uses __attribute__((section)) to push the test cases in custom ELF section. This section we can iterate on and call all tests one-by-one. The test runner only needs to dlopen + dlsym the driver module and run the entry point function. The test-suite part of this is minimal: tests can assert on failure and everything stops. Adding things like fnmatch for test case names is possible when/if we ever need it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: remove udev dep from wacom-testsPeter Hutterer2022-02-031-1/+1
| | | | | | | This was dragged in by the ISDV4 serial code which has since been removed, so it's no longer required here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* autotools: remove the libudev dependency from the driverPeter Hutterer2022-02-031-1/+1
| | | | | | | With the ISDV4 code removed, this is no longer used by the driver itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: remove an unused variablePeter Hutterer2022-02-031-5/+0
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* wacom-record: print the mask of available valuesPeter Hutterer2022-02-032-0/+31
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* wacom-record: print the mode for motion eventsPeter Hutterer2022-02-031-1/+4
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* wacom-record: handle the extra device paths with g_autofree tooPeter Hutterer2022-02-031-1/+2
| | | | | | | As a rule of thumb, don't free anything as g_autofree, just use a new variable instead. Easier to read this way. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* wacom-record: fix segfault if no argument was suppliedPeter Hutterer2022-02-031-1/+1
| | | | | | In that case, argc is 0, so --argc is < 0 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* x11: handle valuators with a first_valuator != 0 correctlyPeter Hutterer2022-02-031-6/+7
| | | | | | | | | xf86Post*EventP requires that the valuators array index 0 is whatever first_valuator is. Found in #222 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove a declaration and some comments referring to serial devicesPeter Hutterer2022-02-033-5/+1
| | | | | | All obsolete since ce2421a031aa0979671ce24d38c08c92b2142257 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* CI: add jobs to build from tarballsPeter Hutterer2022-02-021-0/+72
|
* autotools: make sure the gwacom sources are in the tarballPeter Hutterer2022-02-021-0/+8
| | | | | | | Those aren't used by autotools but if we want to build an autotools-generated tarball with meson we need to provide them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* wacom 0.99.1xf86-input-wacom-0.99.1Peter Hutterer2022-02-012-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson: default to the module dir from xorg-server.pcPeter Hutterer2022-01-242-3/+2
| | | | | | | | | | | | | | On Ubuntu 20.04 at least, libdir is /usr/lib/x86_64-linux-gnu/ but the xorg modules are in /usr/lib/xorg/modules/. A default install with prefix /usr thus puts the modules into the wrong directory. Fix this by defaulting to the xorg module path from the xserver pkgconfig file. That has been exported since 2005, so it's save to rely on. Fixes #217 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix a compilation error when DEBUG is undefinedPeter Hutterer2022-01-172-6/+3
| | | | | | Fixes #214 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Escape an unused variable with ifdef DEBUGPeter Hutterer2022-01-171-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Change the v3-v6 debug holders to an arrayPeter Hutterer2022-01-171-13/+13
| | | | | | | | This removes the compiler warnings when DEBUG is undefined, they're all only used for debug logging but we don't want to ifdef them everywhere. v5 is the only one "used" but only to re-calculate things. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove duplicate setting of v5/v6Peter Hutterer2022-01-171-2/+0
| | | | | | Both are unconditionally set a few lines south of here Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove an unused variablePeter Hutterer2022-01-171-5/+3
| | | | | | | This was always set to nbbuttons, so we don't need a separate variable here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* github: skip the coverity workflow in the forksPeter Hutterer2022-01-171-0/+1
| | | | | These always fail since we don't have the required secrets. Skip that job unless we're on the upstream repository.
* Remove support for serial devices from the driverPeter Hutterer2022-01-125-1044/+3
| | | | | | | | | | | The serial code inside the driver is effectively unused and definitely untested. It's been a decade since the last serial devices came out and few of those will be in active use, the few that are are likely supported by the inputattach code we keep in place for now. Fixes #197 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Report puck "throttle" (absolute scrollwheel) data in correct axisJason Gerecke2022-01-081-1/+1
| | | | | | | | | The "throttle" / absolute scrollwheel found on devices like the 4D Mouse should be reported in the v4 axis. A typo in a previous commit caused it to stop being reported. Fixes: 58a931bc21 ("Abstract the event interface to pass a struct with axis data around") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* github: make the workflow names a bit smarterPeter Hutterer2022-01-051-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Disallow initalization of unknown device axis by wcmInitAxisJason Gerecke2021-12-201-0/+2
| | | | | | | | | | | | | Addresses the following compile warning from GCC: ../src/x11/xf86Wacom.c: In function ‘wcmInitAxis’: ../src/x11/xf86Wacom.c:538:9: warning: ‘index’ may be used uninitialized in this function [-Wmaybe-uninitialized] Attempting to initialize an unknown axis will now result in a program abort. This copies the behavior used by the `convertAxes` function. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
* Bail out if wcmDevStar() failsPeter Hutterer2021-12-201-1/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove an outdated commentPeter Hutterer2021-12-201-1/+0
| | | | | | No idea what this is referring to but it's no longer accurate. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Change wcmDevSwitchModeCall to take and return a BoolPeter Hutterer2021-12-203-17/+15
| | | | | | | Let the caller handle the X11 constants and just take an "is_absolute" boolean and return a boolean to indicate success Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove an outdated commentPeter Hutterer2021-12-201-3/+0
| | | | | | | Now that the driver is separated into src/x11 and the file was renamed, this comment is both wrong and outdated. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add a debugging hook for evdev eventsPeter Hutterer2021-12-206-1/+57
| | | | | | | | Unused in the X driver interface but for libgwacom/wacom-record we can use this to print evdev events before driver events, making it easier to figure out which input causes which driver output Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Drop include of linux/version.hPeter Hutterer2021-12-201-1/+0
| | | | | | No longer needed Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add a GObject-based interface to the driverPeter Hutterer2021-12-209-2/+1822
| | | | | | | | | | | | | | | | This patch adds a basic GObject-based library in lib/ that is sufficient to interact with the driver. The example tools/wacom-record.c is provided to illustrate the use of this library and to provide a commandline debugging tool. This library is for testing use only, it does not provide a stable API and should not be used. It is not installed and only available if the driver is built with meson. GObject IR bindings are available too to write e.g. Python programs that use the driver. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Move the X-driver-specific files into src/x11Peter Hutterer2021-12-204-4/+4
| | | | | | | | | | | These two files are the only ones that interact with the X server, let's move them so we have a visible separation between the core driver and the X parts. Renaming wcmXCommand.c to xf86WacomProperties.c in the process, for slightly better namespacing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Split the various logging functions into several callsPeter Hutterer2021-12-2010-31/+133
| | | | | | | | | | | We have driver and device logging, and each as a normal log function, a sigsafe log path and a debug message log path. So 6 functions overall. This doesn't matter for the X driver which routes sigsafe to LogMessageVerbSigSafe but for other frontends it's useful to keep these apart. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Pass the context to two helper functionsPeter Hutterer2021-12-204-20/+21
| | | | | | | In both cases we'll use that context in a follow-up patch to hook into the logging functions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Decide on the hotplugged device's name in the driverPeter Hutterer2021-12-203-26/+29
| | | | | | | | For devices hotplugged by the driver, we use the basename and then append the tool type and serial (if any). No point having this in the X driver layer, let's make this generic. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Change return type of wcmDevInit for better readabilityPeter Hutterer2021-12-202-2/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Allocate the touch valuators in the driver layerPeter Hutterer2021-12-202-1/+8
| | | | | | | | | This is ugly. Ideally we'd have those valuators in a custom struct in the driver layer but... we don't have that struct, we're using pInfo. So rather than wrapping that into yet another struct, let's just allocate directly here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Wrap GetTimeInMillis()Peter Hutterer2021-12-205-17/+23
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Move a function to the core driver layerPeter Hutterer2021-12-202-25/+26
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Abstract the pInfo pointer as a generic frontend void pointerPeter Hutterer2021-12-206-40/+48
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Allow building the driver without serial ISDV4 supportPeter Hutterer2021-12-207-46/+70
| | | | | | | | | | If configured with -Disdv4=false, the ISDV4 serial bits will not be built, including the udev rules and the inputattach helper and service files. This is meson only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>