This is not exposed in the public API. We want to simplify the internal libudev-device API as much as possible
so that it will be simpler to rip the whole thing out in the future.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Stay uniform and use 'dev' rather than 'event->dev', as these are aliases (and event->dev looks
like it may be a typo for event->dev_db).
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
One would expect pressing the button to go to an overview / show
applications mode, we thus map it to leftmeta, the Windows key.
See https://bugzilla.gnome.org/show_bug.cgi?id=658602#c17
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Currently used to tag devices in the new Lenovo *50 series and the X1 Carbon
3rd. These laptops re-introduced the physical trackpoint buttons that were
missing from the *40 series but those buttons are now wired up to the
touchpad.
The touchpad now sends BTN_0, BTN_1 and BTN_2 for the trackpoint. The same
button codes were used in older touchpads that had dedicated scroll up/down
buttons. Input drivers need to work around this and thus know what they're
dealing with.
For the previous gen we introduced INPUT_PROP_TOPBUTTONPAD in the kernel, but
the resulting mess showed that these per-device quirks should really live in
userspace.
The list currently includes the X1 Carbon 3rd PNPID, others will be added as
get to know which PNPID they have.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
prefixes with syslog priority
This is useful when we execute our own programs, reading output from its
STDERR, and want to retain priority information.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
dpkg itself also uses *.dpkg-dist, while .dpkg-{bak,backup,remove} are being
used by dpkg-maintscript-helper.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Don't use recvmsg(2) return value to check for too long packets
(it doesn't work) but MSG_TRUNC flag.
(David: add parantheses around condition)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Some time ago 95-keymap.rules was replaced by
60-keyboard.hwdb. Original comments for MSI laptops (that were in
95-keymap.rules) were removed, but I think they are important for
understanding what's going on.
https://bugs.freedesktop.org/show_bug.cgi?id=88412
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Not all instance of mkostemp were protected with #ifndef HAVE_DECL_MKOSTEMP.
We fix this for the definition of the wrapper mkostemp_safe() in the c file
and in the header.
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* configure.ac: use LT_LIBM to check for the maths library
* src/accelerometer/Makefile.am: use $(LIBM) instead of -lm in the link
flags
This causes all executables (except accelerometer) and libraries to be
linked without libm, which they do not need.
Make sure to extract the log-priority when comparing against
max-log-level, otherwise, we will always drop those messages.
This fixes bus-proxyd to properly send warnings on policy blocks.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
There is no reason to keep both separated. We want to avoid API specific
tools and instead keep generic terms like 'input'.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Make sure we properly validate the return value of
udev_device_get_sysattr_value(). It might be NULL for several reasons.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This rule is only run on tablet/touchscreen devices, and extracts their size
in millimeters, as it can be found out through their struct input_absinfo.
The first usecase is exporting device size from tablets/touchscreens. This
may be useful to separate policy and application at the time of mapping
these devices to the available outputs in windowing environments that don't
offer that information as readily (eg. Wayland). This way the compositor can
stay deterministic, and the mix-and-match heuristics are performed outside.
Conceivably, size/resolution information can be changed through EVIOCSABS
anywhere else, but we're only interested in values prior to any calibration,
this rule is thus only run on "add", and no tracking of changes is performed.
This should only remain a problem if calibration were automatically applied
by an earlier udev rule (read: don't).
v2: Folded rationale into commit log, made a builtin, set properties
on device nodes themselves
v3: Use inline function instead of macro for mm. size calculation,
use DECIMAL_STR_MAX, other code style issues
v4: Made rule more selective
v5: Minor style issues, renamed to a more generic builtin, refined
rule further.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This device has 18 stops per rotation == 20 degree angle. Advertised as
"Micro-precise scrolling"
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Most mice have a wheel click angle of 15 degrees, i.e. 24 clicks per full
wheel rotation. Some mice, like the Logitech M325 have a larger angle. To
allow userspace to make use of that knowledge, add a property to the hwdb.
This allows for better predictive scrolling. e.g. a mouse that has a smaller
click angle will scroll faster, with this value you can accommodate this
where needed. Likewise, using "half turn of the wheel" or "full turn of the
wheel" as a UI element becomes possible.
This addition is mainly driven by libinput 0.8, having the angle enables
libinput to provide an API that distinguishes between a physical distance
(like touchpad scrolling does) and discrete steps (wheel clicks).
Callers can choose what they prefer based on the device.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Error, DATA expected but got 'mouse:usb:v046dpc24c:name:Logitech G400s Optical
Gaming Mouse:' in '/etc/udev/hwdb.d/70-mouse.hwdb':
Error, MATCH expected but got ' MOUSE_DPI=400@1000 *800@1000 2000@1000
4000@1000' in '/etc/udev/hwdb.d/70-mouse.hwdb':
Introduced in 6366e349
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Devices with dynamic frequency scaling adjust the frequency as needed. For
those we only care about the maximum frequency, not the various in betweens.
https://bugs.freedesktop.org/show_bug.cgi?id=87435#c8
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>