mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-25 09:59:16 +00:00
Compare commits
13 Commits
xf86-input
...
xlibre-xf8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d7b5c8196 | ||
|
|
a95e7b25e6 | ||
|
|
f03931201b | ||
|
|
13559018bd | ||
|
|
2e1f7a9b3a | ||
|
|
9e3544b258 | ||
|
|
cda5a982af | ||
|
|
83adc38e59 | ||
|
|
1330f1ded1 | ||
|
|
8366e3a41e | ||
|
|
9c64c0236c | ||
|
|
c674db53d9 | ||
|
|
8a63e97e0c |
65
.github/ISSUE_TEMPLATE/01-bug-report.yml
vendored
Normal file
65
.github/ISSUE_TEMPLATE/01-bug-report.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: 🐞 Bug report
|
||||
description: Create a report to help us improve
|
||||
|
||||
labels: [bug, needs-triage]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
|
||||
- type: dropdown
|
||||
id: affected-version
|
||||
attributes:
|
||||
label: Select the version
|
||||
options:
|
||||
- 1.5.0.1
|
||||
- Git master branch
|
||||
- other or don't know
|
||||
default: 1
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe your issue
|
||||
placeholder: When I did X then Y happened.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
placeholder: |
|
||||
1. Start ...
|
||||
2. Do this
|
||||
3. Do that
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: What did you expect?
|
||||
placeholder: I expected this to happen.
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: |
|
||||
Additional information you want to provide such as logs, system info, environment, screenshots, etc.
|
||||
placeholder: |
|
||||
Add any other context about the bug here.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Extra fields
|
||||
options:
|
||||
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
|
||||
required: true
|
||||
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
|
||||
required: true
|
||||
- label: I'd like to work on this issue
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for reporting this issue! We will get back to you as soon as possible.
|
||||
49
.github/ISSUE_TEMPLATE/02-feature-request.yml
vendored
Normal file
49
.github/ISSUE_TEMPLATE/02-feature-request.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: ✨ Feature request
|
||||
description: Suggest a feature for this software
|
||||
labels: [enhancement, needs-triage]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: "Describe the feature"
|
||||
placeholder: A thing in X that allows to do Y.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: rationale
|
||||
attributes:
|
||||
label: "It should be done because"
|
||||
placeholder: Doing Y is needed for Z.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternative
|
||||
attributes:
|
||||
label: "What are the alternatives?"
|
||||
placeholder: We could do A or B instead.
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc.
|
||||
placeholder: |
|
||||
Add any other context about the feature request here.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Extra fields
|
||||
options:
|
||||
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
|
||||
required: true
|
||||
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
|
||||
required: true
|
||||
- label: I'd like to work on this issue
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for your suggestion! Let's see together if it can be done.
|
||||
49
.github/ISSUE_TEMPLATE/03-code-cleanup.yml
vendored
Normal file
49
.github/ISSUE_TEMPLATE/03-code-cleanup.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: 🔧 Code cleanup
|
||||
description: Level up the source code
|
||||
labels: [code-cleanup, needs-triage]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: "Describe the cleanup"
|
||||
placeholder: C in X needs to be changed into D.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: rationale
|
||||
attributes:
|
||||
label: "It should be done because"
|
||||
placeholder: Having D is needed for E.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternative
|
||||
attributes:
|
||||
label: "What are the alternatives?"
|
||||
placeholder: We could do A or B instead.
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc.
|
||||
placeholder: |
|
||||
Add any other context about the cleanup here.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Extra fields
|
||||
options:
|
||||
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
|
||||
required: true
|
||||
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
|
||||
required: true
|
||||
- label: I'd like to work on this issue
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for looking at the source code! Let's see together how it can be improved.
|
||||
38
.github/ISSUE_TEMPLATE/04-doc-update.yml
vendored
Normal file
38
.github/ISSUE_TEMPLATE/04-doc-update.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: 🔖 Documentation update
|
||||
description: Make your mark for better documentation
|
||||
|
||||
labels: [documentation, needs-triage]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the update
|
||||
placeholder: These things need to be better documented.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc.
|
||||
placeholder: |
|
||||
Add any other context about the update here.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Extra fields
|
||||
options:
|
||||
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
|
||||
required: true
|
||||
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
|
||||
required: true
|
||||
- label: I'd like to work on this issue
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for requesting this update! We will get back to you as soon as possible.
|
||||
43
.github/ISSUE_TEMPLATE/05-org-task.yml
vendored
Normal file
43
.github/ISSUE_TEMPLATE/05-org-task.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: ✅ Organizational task
|
||||
description: Create a task for project organization
|
||||
|
||||
labels: [needs-triage, organization]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the task
|
||||
placeholder: These things need to be done.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: rationale
|
||||
attributes:
|
||||
label: "It should be done because"
|
||||
placeholder: Doing Y is needed for Z.
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc.
|
||||
placeholder: |
|
||||
Add any other context about the task here.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Extra fields
|
||||
options:
|
||||
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-input-libinput/issues)
|
||||
required: true
|
||||
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
|
||||
required: true
|
||||
- label: I'd like to work on this issue
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for adding this task! We will get back to you as soon as possible.
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: XLibre Community Support
|
||||
url: https://github.com/orgs/X11Libre/discussions
|
||||
about: Please ask and answer questions here.
|
||||
- name: Mailing List
|
||||
url: https://www.freelists.org/list/xlibre
|
||||
about: You can join the discussions on our mailing list.
|
||||
69
.github/actions/build-driver/action.yaml
vendored
Normal file
69
.github/actions/build-driver/action.yaml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: 'build driver'
|
||||
description: 'build driver against specific Xserver'
|
||||
inputs:
|
||||
xserver-version:
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: check out driver repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: prepare build environment
|
||||
shell: bash
|
||||
run: |
|
||||
MACHINE=`gcc -dumpmachine`
|
||||
echo "MACHINE=$MACHINE" >> "$GITHUB_ENV"
|
||||
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
|
||||
sudo chown root /bin/tar && sudo chmod u+s /bin/tar
|
||||
|
||||
- name: apt cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /var/cache/apt
|
||||
key: apt-cache-${{ hashFiles('.github/scripts/ubuntu/install-pkg.sh') }}
|
||||
restore-keys: apt-cache-
|
||||
|
||||
- name: pkg install
|
||||
shell: bash
|
||||
run: sudo .github/scripts/ubuntu/install-pkg.sh
|
||||
|
||||
- name: X11 prereq cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ env.X11_PREFIX }}
|
||||
key: ${{ runner.name }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
|
||||
restore-keys: ${{ runner.name }}-x11-deps-
|
||||
|
||||
- name: generic prereq
|
||||
shell: bash
|
||||
run: .github/scripts/install-prereq.sh
|
||||
|
||||
- name: check out xserver repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: X11Libre/xserver
|
||||
path: xserver-sdk
|
||||
ref: ${{ inputs.xserver-version }}
|
||||
|
||||
- name: build xserver sdk
|
||||
shell: bash
|
||||
env:
|
||||
MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dnamespace=false -Dxselinux=false -Dxephyr=false -Dwerror=false -Dxcsecurity=false -Dxorg=true -Dxvfb=false -Dxnest=false -Ddocs=false
|
||||
run: |
|
||||
cd xserver-sdk
|
||||
echo -n > .meson_environment
|
||||
echo "export MESON_BUILDDIR=$MESON_BUILDDIR" >> .meson_environment
|
||||
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> .meson_environment
|
||||
.gitlab-ci/meson-build.sh --skip-test
|
||||
sudo meson install --no-rebuild -C "$MESON_BUILDDIR"
|
||||
sudo mkdir -p /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
||||
sudo chown -R runner /usr/local/lib/$MACHINE/xorg/modules # /home/runner/x11/lib/xorg/modules
|
||||
|
||||
- name: compile driver
|
||||
shell: bash
|
||||
run: |
|
||||
CFLAGS="-Wall" ./autogen.sh # --prefix=$X11_PREFIX
|
||||
CFLAGS="-Wall" make -j # install
|
||||
13
.github/scripts/conf.sh
vendored
Normal file
13
.github/scripts/conf.sh
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export X11_OS=`uname -s`
|
||||
|
||||
export X11_PREFIX="${X11_PREFIX:-$HOME/x11}"
|
||||
export X11_BUILD_DIR="${X11_BUILD_DIR:-$HOME/build-deps}"
|
||||
export DRV_BUILD_DIR="${DRV_BUILD_DIR:-$HOME/build-drivers}"
|
||||
|
||||
case "$X11_OS" in
|
||||
Darwin) export FDO_CI_CONCURRENT=`sysctl -n hw.logicalcpu` ;;
|
||||
Linux) export FDO_CI_CONCURRENT=`nproc` ;;
|
||||
esac
|
||||
|
||||
export PATH="$X11_PREFIX/bin:$PATH"
|
||||
export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||
17
.github/scripts/github/make-release
vendored
Executable file
17
.github/scripts/github/make-release
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
err() {
|
||||
echo "$0: $*"
|
||||
}
|
||||
|
||||
[ "$GITHUB_REPOSITORY" ] || err "missing variable GITHUB_REPOSITORY"
|
||||
|
||||
TITLE=$(git tag -l --format='%(contents)' $tag)
|
||||
|
||||
echo "tag=$tag"
|
||||
echo "title=$TITLE"
|
||||
|
||||
gh release create "$tag" \
|
||||
--repo="$GITHUB_REPOSITORY" \
|
||||
--title="$tag" \
|
||||
--generate-notes
|
||||
15
.github/scripts/install-prereq.sh
vendored
Executable file
15
.github/scripts/install-prereq.sh
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
. .github/scripts/util.sh
|
||||
|
||||
mkdir -p $X11_BUILD_DIR
|
||||
cd $X11_BUILD_DIR
|
||||
|
||||
if [ "$X11_OS" = "Linux" ]; then
|
||||
build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 "" \
|
||||
-Domap=enabled
|
||||
fi
|
||||
build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0
|
||||
build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1
|
||||
94
.github/scripts/ubuntu/install-pkg.sh
vendored
Executable file
94
.github/scripts/ubuntu/install-pkg.sh
vendored
Executable file
@@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Packages which are needed by this script, but not for the xserver build
|
||||
EPHEMERAL="
|
||||
libexpat-dev
|
||||
libgles2-mesa-dev
|
||||
libxkbcommon-dev
|
||||
x11-utils
|
||||
x11-xserver-utils
|
||||
xauth
|
||||
xvfb
|
||||
"
|
||||
|
||||
apt-get update
|
||||
|
||||
apt-get install -y \
|
||||
$EPHEMERAL \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
libaudit-dev \
|
||||
libbsd-dev \
|
||||
libcairo2-dev \
|
||||
libdbus-1-dev \
|
||||
libdrm-dev \
|
||||
libegl1-mesa-dev \
|
||||
libepoxy-dev \
|
||||
libevdev2 \
|
||||
libexpat1 \
|
||||
libffi-dev \
|
||||
libgbm-dev \
|
||||
libgcrypt-dev \
|
||||
libgl1-mesa-dev \
|
||||
libgles2 \
|
||||
libglx-mesa0 \
|
||||
libinput10 \
|
||||
libinput-dev \
|
||||
libnvidia-egl-wayland-dev \
|
||||
libpciaccess-dev \
|
||||
libpixman-1-dev \
|
||||
libspice-protocol-dev \
|
||||
libsystemd-dev \
|
||||
libudev-dev \
|
||||
libunwind-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxau-dev \
|
||||
libxaw7-dev \
|
||||
libxcb-glx0-dev \
|
||||
libxcb-icccm4-dev \
|
||||
libxcb-image0-dev \
|
||||
libxcb-keysyms1-dev \
|
||||
libxcb-randr0-dev \
|
||||
libxcb-render-util0-dev \
|
||||
libxcb-render0-dev \
|
||||
libxcb-shape0-dev \
|
||||
libxcb-shm0-dev \
|
||||
libxcb-util0-dev \
|
||||
libxcb-xf86dri0-dev \
|
||||
libxcb-xkb-dev \
|
||||
libxcb-xv0-dev \
|
||||
libxcb1-dev \
|
||||
libxdmcp-dev \
|
||||
libxext-dev \
|
||||
libxfixes-dev \
|
||||
libxfont-dev \
|
||||
libxi-dev \
|
||||
libxinerama-dev \
|
||||
libxkbcommon0 \
|
||||
libxkbfile-dev \
|
||||
libxmu-dev \
|
||||
libxmuu-dev \
|
||||
libxpm-dev \
|
||||
libxrender-dev \
|
||||
libxres-dev \
|
||||
libxshmfence-dev \
|
||||
libxt-dev \
|
||||
libxtst-dev \
|
||||
libxv-dev \
|
||||
mesa-common-dev \
|
||||
meson \
|
||||
nettle-dev \
|
||||
libpango1.0-dev \
|
||||
pkg-config \
|
||||
x11-xkb-utils \
|
||||
xfonts-utils \
|
||||
xkb-data \
|
||||
xtrans-dev \
|
||||
xutils-dev \
|
||||
libxaw7-dev \
|
||||
python3-mako
|
||||
85
.github/scripts/util.sh
vendored
Normal file
85
.github/scripts/util.sh
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
|
||||
. .github/scripts/conf.sh
|
||||
|
||||
clone_source() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
|
||||
if [ ! -f $pkgname/.git/config ]; then
|
||||
echo "need to clone $pkgname"
|
||||
if [ "$commit" ]; then
|
||||
git clone $url $pkgname --branch=$ref
|
||||
else
|
||||
git clone $url $pkgname --branch=$ref --depth 1
|
||||
fi
|
||||
else
|
||||
echo "already cloned $pkgname"
|
||||
fi
|
||||
|
||||
if [ "$commit" ]; then
|
||||
( cd $pkgname && git checkout -f "$commit" )
|
||||
fi
|
||||
}
|
||||
|
||||
build_meson() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||
echo "package $pkgname already built"
|
||||
else
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
meson "$@" build -Dprefix=$X11_PREFIX
|
||||
ninja -j${FDO_CI_CONCURRENT:-4} -C build install
|
||||
)
|
||||
touch $X11_PREFIX/$pkgname.DONE
|
||||
fi
|
||||
}
|
||||
|
||||
build_ac() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
if [ -f $X11_PREFIX/$pkgname.DONE ]; then
|
||||
echo "package $pkgname already built"
|
||||
else
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
./autogen.sh --prefix=$X11_PREFIX
|
||||
make -j${FDO_CI_CONCURRENT:-4} install
|
||||
)
|
||||
touch $X11_PREFIX/$pkgname.DONE
|
||||
fi
|
||||
}
|
||||
|
||||
build_drv_ac() {
|
||||
local pkgname="$1"
|
||||
local url="$2"
|
||||
local ref="$3"
|
||||
local commit="$4"
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
shift || true
|
||||
clone_source "$pkgname" "$url" "$ref" "$commit"
|
||||
(
|
||||
cd $pkgname
|
||||
./autogen.sh # --prefix=$X11_PREFIX
|
||||
make -j${FDO_CI_CONCURRENT:-4} # install
|
||||
)
|
||||
}
|
||||
43
.github/workflows/build.yml
vendored
Normal file
43
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Build driver
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
MESON_BUILDDIR: "build"
|
||||
X11_PREFIX: /home/runner/x11
|
||||
X11_BUILD_DIR: /home/runner/build-deps
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
for-xserver-stable-25_0:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/build-driver
|
||||
with:
|
||||
xserver-version: xlibre-xserver-25.0.0.5
|
||||
|
||||
for-xserver-master:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/build-driver
|
||||
with:
|
||||
xserver-version: master
|
||||
|
||||
release:
|
||||
name: Release pushed tag
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.ref_name }}
|
||||
run: .github/scripts/github/make-release
|
||||
@@ -27,9 +27,9 @@ stages:
|
||||
.fedora:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: 39
|
||||
FDO_DISTRIBUTION_PACKAGES: 'git autoconf automake libtool make xorg-x11-server-devel libudev-devel libevdev-devel libinput-devel xorg-x11-util-macros'
|
||||
FDO_DISTRIBUTION_PACKAGES: 'git autoconf automake libtool make xorg-x11-server-devel libudev-devel libevdev-devel libinput-devel xorg-x11-util-macros diffutils'
|
||||
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/fedora-install.sh'
|
||||
FDO_DISTRIBUTION_TAG: '2024-02-20.0'
|
||||
FDO_DISTRIBUTION_TAG: '2025-04-01.0'
|
||||
|
||||
|
||||
fedora@container_build:
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
|
||||
# During distcheck, system locations (as provided by pkg-config) may
|
||||
# not be writable; provide instead relative locations.
|
||||
DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules' \
|
||||
--with-sdkdir='$${includedir}/xorg'
|
||||
|
||||
SUBDIRS = src include man test
|
||||
MAINTAINERCLEANFILES = ChangeLog INSTALL
|
||||
|
||||
@@ -115,11 +115,12 @@ LIBS=$OLD_LIBS
|
||||
CFLAGS=$OLD_CFLAGS
|
||||
|
||||
# Define a configure option for an alternate input module directory
|
||||
PKG_PROG_PKG_CONFIG([0.25])
|
||||
AC_ARG_WITH(xorg-module-dir,
|
||||
AC_HELP_STRING([--with-xorg-module-dir=DIR],
|
||||
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
|
||||
AS_HELP_STRING([--with-xorg-module-dir=DIR],
|
||||
[Default xorg module directory]),
|
||||
[moduledir="$withval"],
|
||||
[moduledir="$libdir/xorg/modules"])
|
||||
[moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`])
|
||||
inputdir=${moduledir}/input
|
||||
AC_SUBST(inputdir)
|
||||
|
||||
|
||||
@@ -154,6 +154,12 @@
|
||||
/* Scroll pixel distance: CARD32, 1 value, read-only */
|
||||
#define LIBINPUT_PROP_SCROLL_PIXEL_DISTANCE_DEFAULT "libinput Scrolling Pixel Distance Default"
|
||||
|
||||
/* Scroll factor: FLOAT, 1 value, 32 bit */
|
||||
#define LIBINPUT_PROP_SCROLL_FACTOR "libinput Scrolling Factor"
|
||||
|
||||
/* Scroll factor: FLOAT, 1 value, 32 bit, read-only */
|
||||
#define LIBINPUT_PROP_SCROLL_FACTOR_DEFAULT "libinput Scrolling Factor Default"
|
||||
|
||||
/* Click method: BOOL read-only, 2 values in order buttonareas, clickfinger
|
||||
shows available click methods */
|
||||
#define LIBINPUT_PROP_CLICK_METHODS_AVAILABLE "libinput Click Methods Available"
|
||||
|
||||
493
man/libinput.man
493
man/libinput.man
@@ -1,6 +1,7 @@
|
||||
'\" t
|
||||
.\" shorthand for double quote that works everywhere.
|
||||
.ds q \N'34'
|
||||
.TH LIBINPUT 4 @VERSION@
|
||||
.TH LIBINPUT 4 2025-06-01 "@VERSION@"
|
||||
.SH NAME
|
||||
libinput \- libinput-based X.Org input driver
|
||||
.SH SYNOPSIS
|
||||
@@ -14,42 +15,50 @@ libinput \- libinput-based X.Org input driver
|
||||
.fi
|
||||
|
||||
.SH NOTE
|
||||
This is the man page for the X input driver. If you are looking for the
|
||||
library documentation, go to
|
||||
.BI http://wayland.freedesktop.org/libinput/doc/
|
||||
This is the man page for the X input driver.
|
||||
If you are looking for the library documentation, go to
|
||||
.B http://wayland.freedesktop.org/libinput/doc/
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B libinput
|
||||
is an Xorg input driver based on libinput. It
|
||||
therefore supports all input devices that libinput can handle, including
|
||||
is an Xorg input driver based on libinput.
|
||||
It therefore supports all input devices that libinput can handle, including
|
||||
most mice, keyboards, tablets and touchscreens.
|
||||
.PP
|
||||
It is recommended that
|
||||
.B libinput
|
||||
devices are configured through the
|
||||
.B InputClass
|
||||
directive (refer to xorg.conf(5)) instead of manual
|
||||
per-device configuration. Devices configured in the
|
||||
xorg.conf(5) are not hot-plug capable.
|
||||
directive (refer to
|
||||
.BR xorg.conf (5))
|
||||
instead of manual per-device configuration.
|
||||
Devices configured using the
|
||||
.B InputDevice
|
||||
directive in the
|
||||
.BR xorg.conf (5)
|
||||
file are not hot-plug capable.
|
||||
|
||||
.SH CONFIGURATION DETAILS
|
||||
Please refer to xorg.conf(5) for general configuration
|
||||
details and for options that can be used with all input drivers. This
|
||||
section only covers configuration details specific to this driver.
|
||||
Please refer to
|
||||
.BR xorg.conf (5)
|
||||
for general configuration details
|
||||
and for options that can be used with all input drivers.
|
||||
This section only covers configuration details specific to this driver.
|
||||
.PP
|
||||
The following driver
|
||||
.B Options
|
||||
are supported:
|
||||
.TP 7
|
||||
.BI "Option \*qAccelProfile\*q \*q" string \*q
|
||||
Sets the pointer acceleration profile to the given profile. Permitted values
|
||||
are
|
||||
.BI adaptive,
|
||||
.BI flat,
|
||||
.BI custom.
|
||||
Not all devices support this option or all profiles. If a profile is
|
||||
unsupported, the default profile for this device is used. For a description
|
||||
on the profiles and their behavior, see the libinput documentation.
|
||||
Sets the pointer acceleration profile to the given profile.
|
||||
Permitted values are
|
||||
.BR adaptive ,
|
||||
.BR flat ,
|
||||
.BR custom .
|
||||
Not all devices support this option or all profiles.
|
||||
If a profile is unsupported, the default profile for this device is used.
|
||||
For a description on the profiles and their behavior,
|
||||
see the libinput documentation.
|
||||
.TP 7
|
||||
.BI "Option \*qAccelSpeed\*q \*q" float \*q
|
||||
Sets the pointer acceleration speed within the range [-1, 1].
|
||||
@@ -61,7 +70,8 @@ This only applies to the flat or adaptive profile.
|
||||
.TQ
|
||||
.BI "Option \*qAccelPointsScroll\*q \*q" string \*q
|
||||
Sets the points of the Fallback/Motion/Scroll acceleration functions.
|
||||
The string must be a space-separated list of floating point non-negative numbers, e.g.
|
||||
The string must be a space-separated list of
|
||||
floating point non-negative numbers, e.g.,
|
||||
"0.0 1.0 2.4 2.5".
|
||||
This only applies to the custom profile.
|
||||
See section
|
||||
@@ -72,22 +82,26 @@ See section
|
||||
.BI "Option \*qAccelStepMotion\*q \*q" float \*q
|
||||
.TQ
|
||||
.BI "Option \*qAccelStepScroll\*q \*q" float \*q
|
||||
Sets the step between the points of the Fallback/Motion/Scroll acceleration functions.
|
||||
When a step of 0.0 is provided, libinput's Fallback acceleration function is used.
|
||||
Sets the step between the points of the Fallback/Motion/Scroll
|
||||
acceleration functions.
|
||||
When a step of 0.0 is provided,
|
||||
libinput's Fallback acceleration function is used.
|
||||
This only applies to the custom profile.
|
||||
See section
|
||||
.B CUSTOM ACCELERATION PROFILE
|
||||
.TP 7
|
||||
.BI "Option \*qButtonMapping\*q \*q" string \*q
|
||||
Sets the logical button mapping for this device, see
|
||||
XSetPointerMapping(3). The string must be a
|
||||
space-separated list of button mappings in the order of the
|
||||
.BR XSetPointerMapping (3).
|
||||
The string must be a space-separated list of button mappings in the order of the
|
||||
logical buttons on the device, starting with button 1.
|
||||
The default mapping is "1 2 3 ... 32". A mapping of 0
|
||||
deactivates the button. Multiple buttons can have the same mapping.
|
||||
The default mapping is "1 2 3 ... 32".
|
||||
A mapping of 0 deactivates the button.
|
||||
Multiple buttons can have the same mapping.
|
||||
Invalid mapping strings are discarded and the default mapping
|
||||
is used for all buttons. Buttons not specified in the user's mapping use the
|
||||
default mapping. See section
|
||||
is used for all buttons.
|
||||
Buttons not specified in the user's mapping use the default mapping.
|
||||
See section
|
||||
.B BUTTON MAPPING
|
||||
for more details.
|
||||
.TP 7
|
||||
@@ -98,44 +112,49 @@ Sets the calibration matrix to the 3x3 matrix where the first row is (abc),
|
||||
the second row is (def) and the third row is (ghi).
|
||||
.TP 7
|
||||
.BI "Option \*qClickMethod\*q \*q" string \*q
|
||||
Enables a click method. Permitted values are
|
||||
.BI none,
|
||||
.BI buttonareas,
|
||||
.BI clickfinger.
|
||||
Not all devices support all methods, if an option is unsupported, the
|
||||
default click method for this device is used.
|
||||
Enables a click method.
|
||||
Permitted values are
|
||||
.BR none ,
|
||||
.BR buttonareas ,
|
||||
.BR clickfinger .
|
||||
Not all devices support all methods.
|
||||
If an option is unsupported, the default click method for this device is used.
|
||||
.TP 7
|
||||
.BI "Option \*qDisableWhileTyping\*q \*q" bool \*q
|
||||
Indicates if the touchpad should be disabled while typing on the keyboard
|
||||
(this does not apply to modifier keys such as Ctrl or Alt).
|
||||
.TP 7
|
||||
.BI "Option \*qDevice\*q \*q" string \*q
|
||||
Specifies the device through which the device can be accessed. This will
|
||||
generally be of the form \*q/dev/input/eventX\*q, where X is some integer.
|
||||
Specifies the device through which the device can be accessed.
|
||||
This will generally be of the form \*q/dev/input/eventX\*q,
|
||||
where X is some integer.
|
||||
When using
|
||||
.B InputClass
|
||||
directives, this option is set by the server.
|
||||
The mapping from device node to hardware is system-dependent. Property:
|
||||
"Device Node" (read-only).
|
||||
The mapping from device node to hardware is system-dependent.
|
||||
Property: "Device Node" (read-only).
|
||||
.TP 7
|
||||
.BI "Option \*qDragLockButtons\*q \*q" "L1 B1 L2 B2 ..." \*q
|
||||
Sets "drag lock buttons" that simulate a button logically down even when it has
|
||||
been physically released. To logically release a locked button, a second click
|
||||
of the same button is required.
|
||||
been physically released.
|
||||
To logically release a locked button,
|
||||
a second click of the same button is required.
|
||||
.IP
|
||||
If the option is a single button number, that button acts as the
|
||||
"meta" locking button for the next button number. See section
|
||||
"meta" locking button for the next button number.
|
||||
See section
|
||||
.B BUTTON DRAG LOCK
|
||||
for details.
|
||||
.IP
|
||||
If the option is a list of button number pairs, the first number of each
|
||||
number pair is the lock button, the second number the logical button number
|
||||
to be locked. See section
|
||||
to be locked.
|
||||
See section
|
||||
.B BUTTON DRAG LOCK
|
||||
for details.
|
||||
.IP
|
||||
For both meta and button pair configuration, the button numbers are
|
||||
device button numbers, i.e. the
|
||||
For both meta and button pair configuration,
|
||||
the button numbers are device button numbers, i.e. the
|
||||
.B ButtonMapping
|
||||
applies after drag lock.
|
||||
.TP 7
|
||||
@@ -145,85 +164,101 @@ the driver forwards only high-resolution wheel scroll events from libinput.
|
||||
When disabled, the driver forwards legacy wheel scroll events instead.
|
||||
.TP 7
|
||||
.BI "Option \*qHorizontalScrolling\*q \*q" bool \*q
|
||||
Enables or disables horizontal scrolling. When disabled, this driver will
|
||||
discard any horizontal scroll events from libinput. This does not disable
|
||||
horizontal scroll events from libinput; it merely discards the horizontal axis
|
||||
from any scroll events. Default is enabled.
|
||||
Enables or disables horizontal scrolling.
|
||||
When disabled,
|
||||
this driver will discard any horizontal scroll events from libinput.
|
||||
This does not disable horizontal scroll events from libinput;
|
||||
it merely discards the horizontal axis from any scroll events.
|
||||
Default is enabled.
|
||||
.TP 7
|
||||
.BI "Option \*qLeftHanded\*q \*q" bool \*q
|
||||
Enables left-handed button orientation, i.e. swapping left and right buttons.
|
||||
.TP 7
|
||||
.BI "Option \*qMiddleEmulation\*q \*q" bool \*q
|
||||
Enables middle button emulation. When enabled, pressing the left and right
|
||||
Enables middle button emulation.
|
||||
When enabled, pressing the left and right
|
||||
buttons simultaneously produces a middle mouse button click.
|
||||
.TP 7
|
||||
.BI "Option \*qNaturalScrolling\*q \*q" bool \*q
|
||||
Enables or disables natural scrolling behavior.
|
||||
.TP 7
|
||||
.BI "Option \*qRotationAngle\*q \*q" float \*q
|
||||
Sets the rotation angle of the device to the given angle, in degrees
|
||||
clockwise. The angle must be between 0.0 (inclusive) and 360.0 (exclusive).
|
||||
Sets the rotation angle of the device to the given angle, in degrees clockwise.
|
||||
The angle must be between 0.0 (inclusive) and 360.0 (exclusive).
|
||||
.TP 7
|
||||
.BI "Option \*qScrollButton\*q \*q" int \*q
|
||||
Designates a button as scroll button. If the
|
||||
.BI ScrollMethod
|
||||
Designates a button as scroll button.
|
||||
If the
|
||||
.B ScrollMethod
|
||||
is
|
||||
.BI button
|
||||
.B button
|
||||
and the button is logically down, x/y axis movement is converted into
|
||||
scroll events.
|
||||
.TP 7
|
||||
.BI "Option \*qScrollButtonLock\*q \*q" bool \*q
|
||||
Enables or disables the scroll button lock. If enabled, the
|
||||
.BI ScrollButton
|
||||
Enables or disables the scroll button lock.
|
||||
If enabled, the
|
||||
.B ScrollButton
|
||||
is considered logically down after the first click and remains down until
|
||||
the second click of that button. If disabled (the default), the
|
||||
.BI ScrollButton
|
||||
the second click of that button.
|
||||
If disabled (the default), the
|
||||
.B ScrollButton
|
||||
button is considered logically down while held down and up once physically
|
||||
released.
|
||||
.TP 7
|
||||
.BI "Option \*qScrollFactor\*q \*q" float \*q
|
||||
Sets the scroll factor for scroll events. A value higher than 1.0 means faster scrolling.
|
||||
Applications that don't support xi2 input will instead receive scroll button events
|
||||
less or more frequently depending on the scroll factor value, instead of scrolling "smoother".
|
||||
.TP 7
|
||||
.BI "Option \*qScrollMethod\*q \*q" string \*q
|
||||
Enables a scroll method. Permitted values are
|
||||
.BI none,
|
||||
.BI twofinger,
|
||||
.BI edge,
|
||||
.BI button.
|
||||
Not all devices support all options, if an option is unsupported, the
|
||||
default scroll option for this device is used.
|
||||
.BR none ,
|
||||
.BR twofinger ,
|
||||
.BR edge ,
|
||||
.BR button .
|
||||
Not all devices support all options.
|
||||
If an option is unsupported, the default scroll option for this device is used.
|
||||
.TP 7
|
||||
.BI "Option \*qScrollPixelDistance\*q \*q" int \*q
|
||||
Sets the movement distance, in "pixels", required to trigger one logical
|
||||
wheel click. This option only applies to the scroll methods
|
||||
.BI twofinger,
|
||||
.BI edge,
|
||||
.BI button.
|
||||
wheel click.
|
||||
This option only applies to the scroll methods
|
||||
.BR twofinger ,
|
||||
.BR edge ,
|
||||
.BR button .
|
||||
See section
|
||||
.B SCROLL PIXEL DISTANCE
|
||||
for more details.
|
||||
.TP 7
|
||||
.BI "Option \*qSendEventsMode\*q \*q" (disabled|enabled|disabled-on-external-mouse) \*q
|
||||
Sets the send events mode to disabled, enabled, or "disable when an external
|
||||
mouse is connected".
|
||||
Sets the send events mode to disabled, enabled,
|
||||
or "disable when an external mouse is connected".
|
||||
.TP 7
|
||||
.BI "Option \*qTabletToolPressureCurve\*q \*q" "x0/y0 x1/y1 x2/y2 x3/y3" \*q
|
||||
Set the pressure curve for a tablet stylus to the bezier formed by the four
|
||||
points. The respective x/y coordinate must be in the [0.0, 1.0] range. For
|
||||
more information see section
|
||||
.B TABLET STYLUS PRESSURE CURVE.
|
||||
points.
|
||||
The respective x/y coordinate must be in the [0.0, 1.0] range.
|
||||
For more information see section
|
||||
.B TABLET TOOL PRESSURE CURVE.
|
||||
.TP 7
|
||||
.BI "Option \*qTabletToolPressureRange\*q \*q" "min max" \*q
|
||||
Set the pressure range for a tablet stylus to the given subset of the physical
|
||||
range. The min/max values must be in the [0.0, 1.0] range. For
|
||||
example a min of 0.3 means the tablet will send 0 pressure for anything equal
|
||||
or below 30% of the physical pressure range and a max of 0.7 means
|
||||
range.
|
||||
The min/max values must be in the [0.0, 1.0] range.
|
||||
For example, a min of 0.3 means the tablet will send 0 pressure for anything
|
||||
equal or below 30% of the physical pressure range and a max of 0.7 means
|
||||
the tablet sends its maximum pressure value for any pressure equal or higher to
|
||||
70% of the physical pressure range.
|
||||
.TP 7
|
||||
.BI "Option \*qTabletToolAreaRatio\*q \*q" "w:h" \*q
|
||||
Sets the area ratio for a tablet tool. The area always starts at the
|
||||
origin (0/0) and expands to the largest available area with the specified
|
||||
aspect ratio. Events outside this area are cropped to the area. The special
|
||||
value "default" is used for the default mapping (i.e. the device-native
|
||||
mapping). For more information see section
|
||||
Sets the area ratio for a tablet tool.
|
||||
The area always starts at the origin (0/0) and
|
||||
expands to the largest available area with the specified aspect ratio.
|
||||
Events outside this area are cropped to the area.
|
||||
The special value "default" is used for the default mapping
|
||||
(i.e. the device-native mapping).
|
||||
For more information see section
|
||||
.B TABLET TOOL AREA RATIO.
|
||||
.TP 7
|
||||
.BI "Option \*qTapping\*q \*q" bool \*q
|
||||
@@ -234,49 +269,53 @@ Set the button mapping for 1/2/3-finger taps to left/right/middle or
|
||||
left/middle/right, respectively.
|
||||
.TP 7
|
||||
.BI "Option \*qTappingDrag\*q \*q" bool \*q
|
||||
Enables or disables drag during tapping behavior ("tap-and-drag"). When
|
||||
enabled, a tap followed by a finger held down causes a single button down
|
||||
Enables or disables drag during tapping behavior ("tap-and-drag").
|
||||
When enabled, a tap followed by a finger held down causes a single button down
|
||||
only, all motions of that finger thus translate into dragging motion.
|
||||
Tap-and-drag requires option
|
||||
.B Tapping
|
||||
to be enabled.
|
||||
.TP 7
|
||||
.BI "Option \*qTappingDragLock\*q \*q" bool \*q
|
||||
Enables or disables drag lock during tapping behavior. When enabled, a
|
||||
finger up during tap-and-drag will not immediately release the button. If
|
||||
the finger is set down again within the timeout, the dragging process
|
||||
continues.
|
||||
Enables or disables drag lock during tapping behavior.
|
||||
When enabled,
|
||||
a finger up during tap-and-drag will not immediately release the button.
|
||||
If the finger is set down again within the timeout,
|
||||
the dragging process continues.
|
||||
.PP
|
||||
For all options, the options are only parsed if the device supports that
|
||||
configuration option. For all options, the default value is the one used by
|
||||
libinput. On configuration failure, the default value is applied.
|
||||
configuration option.
|
||||
For all options, the default value is the one used by libinput.
|
||||
On configuration failure, the default value is applied.
|
||||
|
||||
.SH SUPPORTED PROPERTIES
|
||||
.B libinput
|
||||
exports runtime-configurable options as properties. If a property listed
|
||||
below is not available, the matching configuration option is not available
|
||||
on the device. This however does not imply that the feature is not available
|
||||
on the device. The following properties are provided by the
|
||||
exports runtime-configurable options as properties.
|
||||
If a property listed below is not available,
|
||||
the matching configuration option is not available on the device.
|
||||
This however does not imply that the feature is not available on the device.
|
||||
The following properties are provided by the
|
||||
.B libinput
|
||||
driver.
|
||||
.TP 7
|
||||
.BI "libinput Accel Profiles Available"
|
||||
.B "libinput Accel Profiles Available"
|
||||
3 boolean values (8 bit, 0 or 1), in order "adaptive", "flat", "custom".
|
||||
Indicates which acceleration profiles are available on this device.
|
||||
.TP 7
|
||||
.BI "libinput Accel Profile Enabled"
|
||||
.B "libinput Accel Profile Enabled"
|
||||
3 boolean values (8 bit, 0 or 1), in order "adaptive", "flat", "custom".
|
||||
Indicates which acceleration profile is currently enabled on this device.
|
||||
.TP 7
|
||||
.BI "libinput Accel Speed"
|
||||
1 32-bit float value, defines the pointer speed. Value range -1, 1.
|
||||
.B "libinput Accel Speed"
|
||||
1 32-bit float value, defines the pointer speed.
|
||||
Value range -1, 1.
|
||||
This only applies to the flat or adaptive profile.
|
||||
.TP 7
|
||||
.BI "libinput Accel Custom Fallback Points"
|
||||
.B "libinput Accel Custom Fallback Points"
|
||||
.TQ
|
||||
.BI "libinput Accel Custom Motion Points"
|
||||
.B "libinput Accel Custom Motion Points"
|
||||
.TQ
|
||||
.BI "libinput Accel Custom Scroll Points"
|
||||
.B "libinput Accel Custom Scroll Points"
|
||||
A space-separated list of 32-bit floating point non-negative numbers, e.g.
|
||||
"0.0 1.0 2.4 2.5".
|
||||
Sets the points of the Fallback/Motion/Scroll acceleration functions.
|
||||
@@ -284,11 +323,11 @@ This only applies to the custom profile.
|
||||
See section
|
||||
.B CUSTOM ACCELERATION PROFILE
|
||||
.TP 7
|
||||
.BI "libinput Accel Custom Fallback Step"
|
||||
.B "libinput Accel Custom Fallback Step"
|
||||
.TQ
|
||||
.BI "libinput Accel Custom Motion Step"
|
||||
.B "libinput Accel Custom Motion Step"
|
||||
.TQ
|
||||
.BI "libinput Accel Custom Scroll Step"
|
||||
.B "libinput Accel Custom Scroll Step"
|
||||
1 32-bit float value, sets the step between the points of the
|
||||
Fallback/Motion/Scroll acceleration functions.
|
||||
When a step of 0.0 is provided, libinput's Fallback acceleration
|
||||
@@ -297,113 +336,128 @@ This only applies to the custom profile.
|
||||
See section
|
||||
.B CUSTOM ACCELERATION PROFILE
|
||||
.TP 7
|
||||
.BI "libinput Button Scrolling Button"
|
||||
1 32-bit value. Sets the button number to use for button scrolling. This
|
||||
setting is independent of the scroll method, to enable button scrolling the
|
||||
.B "libinput Button Scrolling Button"
|
||||
1 32-bit value. Sets the button number to use for button scrolling.
|
||||
This setting is independent of the scroll method, to enable button scrolling the
|
||||
method must be set to button-scrolling and a valid button must be set.
|
||||
.TP 7
|
||||
.BI "libinput Button Scrolling Button Lock Enabled"
|
||||
1 boolean value. If true, the scroll button lock is enabled. This
|
||||
setting is independent of the scroll method or the scroll button, to enable
|
||||
.B "libinput Button Scrolling Button Lock Enabled"
|
||||
1 boolean value. If true, the scroll button lock is enabled.
|
||||
This setting is independent of the scroll method or the scroll button, to enable
|
||||
button scrolling the method must be set to button-scrolling and a valid
|
||||
button must be set.
|
||||
.TP 7
|
||||
.BI "libinput Calibration Matrix"
|
||||
.B "libinput Calibration Matrix"
|
||||
9 32-bit float values, representing a 3x3 calibration matrix, order is row
|
||||
1, row 2, row 3
|
||||
.TP 7
|
||||
.BI "libinput Click Methods Available"
|
||||
.B "libinput Click Methods Available"
|
||||
2 boolean values (8 bit, 0 or 1), in order "buttonareas", "clickfinger".
|
||||
Indicates which click methods are available on this device.
|
||||
.TP 7
|
||||
.BI "libinput Click Methods Enabled"
|
||||
.B "libinput Click Methods Enabled"
|
||||
2 boolean values (8 bit, 0 or 1), in order "buttonareas", "clickfinger".
|
||||
Indicates which click methods are enabled on this device.
|
||||
.TP 7
|
||||
.BI "libinput Drag Lock Buttons"
|
||||
.B "libinput Drag Lock Buttons"
|
||||
Either one 8-bit value specifying the meta drag lock button, or a list of
|
||||
button pairs. See section
|
||||
button pairs.
|
||||
See section
|
||||
.B BUTTON DRAG LOCK
|
||||
for details.
|
||||
.TP 7
|
||||
.BI "libinput High Resolution Wheel Scroll Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). Indicates whether high-resolution
|
||||
wheel scroll events are enabled or not.
|
||||
.B "libinput High Resolution Wheel Scroll Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
Indicates whether high-resolution wheel scroll events are enabled or not.
|
||||
.TP 7
|
||||
.BI "libinput Horizontal Scroll Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). Indicates whether horizontal scrolling
|
||||
events are enabled or not.
|
||||
.B "libinput Horizontal Scroll Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
Indicates whether horizontal scrolling events are enabled or not.
|
||||
.TP 7
|
||||
.BI "libinput Left Handed Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). Indicates if left-handed mode is enabled or
|
||||
disabled.
|
||||
.B "libinput Left Handed Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
Indicates if left-handed mode is enabled or disabled.
|
||||
.TP 7
|
||||
.BI "libinput Middle Emulation Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). Indicates if middle emulation is enabled or
|
||||
disabled.
|
||||
.B "libinput Middle Emulation Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
Indicates if middle emulation is enabled or disabled.
|
||||
.TP 7
|
||||
.BI "libinput Natural Scrolling Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). 1 enables natural scrolling
|
||||
.B "libinput Natural Scrolling Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
1 enables natural scrolling.
|
||||
.TP 7
|
||||
.BI "libinput Rotation Angle"
|
||||
1 32-bit float value [0.0 to 360.0). Sets the rotation angle of the device,
|
||||
.B "libinput Rotation Angle"
|
||||
1 32-bit float value [0.0 to 360.0).
|
||||
Sets the rotation angle of the device,
|
||||
clockwise of its natural neutral position.
|
||||
.TP 7
|
||||
.BI "libinput Scroll Methods Available"
|
||||
.B "libinput Scrolling Factor"
|
||||
1 32-bit float value.
|
||||
Sets the scroll factor for scroll events. A value higher than 1.0 means faster scrolling.
|
||||
Applications that don't support xi2 input will instead receive scroll button events
|
||||
less or more frequently depending on the scroll factor value, instead of scrolling "smoother".
|
||||
.TP 7
|
||||
.B "libinput Scroll Methods Available"
|
||||
3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button".
|
||||
Indicates which scroll methods are available on this device.
|
||||
.TP 7
|
||||
.BI "libinput Scroll Method Enabled"
|
||||
.B "libinput Scroll Method Enabled"
|
||||
3 boolean values (8 bit, 0 or 1), in order "two-finger", "edge", "button".
|
||||
Indicates which scroll method is currently enabled on this device.
|
||||
.TP 7
|
||||
.BI "libinput Scroll Pixel Distance"
|
||||
.B "libinput Scrolling Pixel Distance"
|
||||
1 32-bit value (nonzero, with additional implementation-defined range checks).
|
||||
Changes the movement distance required to trigger one logical wheel click.
|
||||
.TP 7
|
||||
.BI "libinput Send Events Modes Available"
|
||||
.B "libinput Send Events Modes Available"
|
||||
2 boolean values (8 bit, 0 or 1), in order "disabled" and
|
||||
"disabled-on-external-mouse". Indicates which send-event modes are available
|
||||
on this device.
|
||||
"disabled-on-external-mouse".
|
||||
Indicates which send-event modes are available on this device.
|
||||
.TP 7
|
||||
.BI "libinput Send Events Mode Enabled"
|
||||
.B "libinput Send Events Mode Enabled"
|
||||
2 boolean values (8 bit, 0 or 1), in order "disabled" and
|
||||
"disabled-on-external-mouse". Indicates which send-event modes is currently
|
||||
enabled on this device.
|
||||
"disabled-on-external-mouse".
|
||||
Indicates which send-event mode is currently enabled on this device.
|
||||
.TP 7
|
||||
.BI "libinput Tablet Tool Pressurecurve"
|
||||
4 32-bit float values [0.0 to 1.0]. See section
|
||||
.B "libinput Tablet Tool Pressurecurve"
|
||||
4 32-bit float values [0.0 to 1.0].
|
||||
See section
|
||||
.B TABLET TOOL PRESSURE CURVE
|
||||
.TP 7
|
||||
.BI "libinput Tablet Tool Area Ratio"
|
||||
2 32-bit values, corresponding to width and height. Special value 0, 0
|
||||
resets to the default ratio. See section
|
||||
.B "libinput Tablet Tool Area Ratio"
|
||||
2 32-bit values, corresponding to width and height.
|
||||
Special value 0, 0 resets to the default ratio.
|
||||
See section
|
||||
.B TABLET TOOL AREA RATIO
|
||||
for more information.
|
||||
.TP 7
|
||||
.BI "libinput Tapping Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). 1 enables tapping
|
||||
.B "libinput Tapping Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
1 enables tapping.
|
||||
.TP 7.
|
||||
.B "libinput Tapping Button Mapping Enabled"
|
||||
2 boolean value (8 bit, 0 or 1), in order "lrm" and "lmr".
|
||||
Indicates which button mapping is currently enabled on this device.
|
||||
.TP 7
|
||||
.BI "libinput Tapping Button Mapping Enabled"
|
||||
2 boolean value (8 bit, 0 or 1), in order "lrm" and "lmr". Indicates which
|
||||
button mapping is currently enabled on this device.
|
||||
.B "libinput Tapping Drag Lock Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
1 enables drag lock during tapping.
|
||||
.TP 7
|
||||
.BI "libinput Tapping Drag Lock Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). 1 enables drag lock during tapping
|
||||
.TP 7
|
||||
.BI "libinput Disable While Typing Enabled"
|
||||
1 boolean value (8 bit, 0 or 1). Indicates if disable while typing is
|
||||
enabled or disabled.
|
||||
.B "libinput Disable While Typing Enabled"
|
||||
1 boolean value (8 bit, 0 or 1).
|
||||
Indicates if disable while typing is enabled or disabled.
|
||||
.PP
|
||||
Most properties have a
|
||||
.BI "libinput <property name> Default"
|
||||
.B "libinput <property name> Default"
|
||||
equivalent that indicates the default value for this setting on this device.
|
||||
|
||||
.SH BUTTON MAPPING
|
||||
X clients receive events with logical button numbers, where 1, 2, 3
|
||||
are usually interpreted as left, middle, right and logical buttons 4, 5, 6,
|
||||
7 are usually interpreted as scroll up, down, left, right. The fourth and
|
||||
fifth physical buttons on a device will thus send logical buttons 8 and 9.
|
||||
X clients receive events with logical button numbers,
|
||||
where 1, 2, 3 are usually interpreted as left, middle, right;
|
||||
and logical buttons 4, 5, 6, 7 are usually interpreted
|
||||
as scroll up, down, left, right.
|
||||
The fourth and fifth physical buttons on a device
|
||||
will thus send logical buttons 8 and 9.
|
||||
The
|
||||
.B ButtonMapping
|
||||
option adjusts the logical button mapping, it does not affect how a physical
|
||||
@@ -421,79 +475,92 @@ option instead.
|
||||
The
|
||||
.B libinput
|
||||
Xorg input driver does not use the button mapping after setup.
|
||||
Use XSetPointerMapping(3) to modify the button mapping at
|
||||
runtime.
|
||||
Use
|
||||
.BR XSetPointerMapping (3)
|
||||
to modify the button mapping at runtime.
|
||||
|
||||
.SH BUTTON DRAG LOCK
|
||||
Button drag lock holds a button logically down even when the button itself
|
||||
has been physically released since. Button drag lock comes in two modes.
|
||||
has been physically released since.
|
||||
Button drag lock comes in two modes.
|
||||
.PP
|
||||
If in "meta" mode, a meta button click activates drag lock for the next
|
||||
button press of any other button. A button click in the future will keep
|
||||
that button held logically down until a subsequent click of that same
|
||||
button. The meta button events themselves are discarded. A separate meta
|
||||
button click is required each time a drag lock should be activated for a
|
||||
button in the future.
|
||||
button press of any other button.
|
||||
A button click in the future will keep that button held logically down
|
||||
until a subsequent click of that same button.
|
||||
The meta button events themselves are discarded.
|
||||
A separate meta button click is required each time a drag lock should be
|
||||
activated for a button in the future.
|
||||
.PP
|
||||
If in "pairs" mode, each button can be assigned a target locking button.
|
||||
On button click, the target lock button is held logically down until the
|
||||
next click of the same button. The button events themselves are discarded
|
||||
next click of the same button.
|
||||
The button events themselves are discarded
|
||||
and only the target button events are sent.
|
||||
.TP
|
||||
.PP
|
||||
This feature is provided by this driver, not by libinput.
|
||||
|
||||
.SH TABLET TOOL PRESSURECURVE
|
||||
The pressure curve affects how stylus pressure is reported. By default, the
|
||||
hardware pressure is reported as-is. By setting a pressure curve, the feel
|
||||
of the stylus can be adjusted to be more like e.g. a pencil or a brush.
|
||||
.SH TABLET TOOL PRESSURE CURVE
|
||||
The pressure curve affects how stylus pressure is reported.
|
||||
By default, the hardware pressure is reported as-is.
|
||||
By setting a pressure curve, the feel of the stylus can be adjusted
|
||||
to be more like e.g. a pencil or a brush.
|
||||
.PP
|
||||
The pressure curve is a cubic Bezier curve, drawn within a normalized range
|
||||
of 0.0 to 1.0 between the four points provided. This normalized range is
|
||||
applied to the tablet's pressure input so that the highest pressure maps to
|
||||
1.0. The points must have increasing x coordinates, if x0 is larger than 0.0
|
||||
all pressure values lower than x0 are equivalent to y0. If x3 is less than
|
||||
1.0, all pressure values higher than x3 are equivalent to y3.
|
||||
|
||||
The input for a linear curve (default) is "0.0/0.0 0.0/0.0 1.0/1.0 1.0/1.0";
|
||||
a slightly
|
||||
depressed curve (firmer) might be "0.0/0.0 0.05/0.0 1.0/0.95 1.0/1.0"; a slightly raised
|
||||
curve (softer) might be "0.0/0.0 0.0/0.05 0.95/1.0 1.0/1.0".
|
||||
.TP
|
||||
of 0.0 to 1.0 between the four points provided.
|
||||
This normalized range is applied to the tablet's pressure input
|
||||
so that the highest pressure maps to 1.0.
|
||||
The points must have increasing x coordinates, if x0 is larger than 0.0
|
||||
all pressure values lower than x0 are equivalent to y0.
|
||||
If x3 is less than 1.0,
|
||||
all pressure values higher than x3 are equivalent to y3.
|
||||
.PP
|
||||
The input for a linear curve (default) is "0.0/0.0 0.0/0.0 1.0/1.0 1.0/1.0";
|
||||
a slightly depressed curve (firmer) might be
|
||||
"0.0/0.0 0.05/0.0 1.0/0.95 1.0/1.0";
|
||||
a slightly raised curve (softer) might be "0.0/0.0 0.0/0.05 0.95/1.0 1.0/1.0".
|
||||
.PP
|
||||
This feature is provided by this driver, not by libinput.
|
||||
|
||||
.SH TABLET TOOL AREA RATIO
|
||||
By default, a tablet tool can access the whole sensor area and the tablet
|
||||
area is mapped to the available screen area. For external tablets like
|
||||
the Wacom Intuos series, the height:width ratio of the tablet may be
|
||||
different to that of the monitor, causing the skew of input data.
|
||||
area is mapped to the available screen area.
|
||||
For external tablets like the Wacom Intuos series,
|
||||
the height:width ratio of the tablet may be different to that of the monitor,
|
||||
causing the skew of input data.
|
||||
.PP
|
||||
To avoid this skew of input data, an area ratio may be set to match the
|
||||
ratio of the screen device. For example, a ratio of 4:3 will reduce the
|
||||
available area of the tablet to the largest available area with a ratio of
|
||||
4:3. Events within this area will scale to the tablet's announced axis
|
||||
range, the area ratio is thus transparent to the X server. Any events
|
||||
outside this area will send events equal to the maximum value of that axis.
|
||||
The area always starts at the device's origin in it's current rotation, i.e.
|
||||
ratio of the screen device.
|
||||
For example, a ratio of 4:3 will reduce the available area of the tablet
|
||||
to the largest available area with a ratio of 4:3.
|
||||
Events within this area will scale to the tablet's announced axis range,
|
||||
the area ratio is thus transparent to the X server.
|
||||
Any events outside this area will send events equal to the maximum value of
|
||||
that axis.
|
||||
The area always starts at the device's origin in it's current rotation, i.e.,
|
||||
it takes left-handed-ness into account.
|
||||
.TP
|
||||
.PP
|
||||
This feature is provided by this driver, not by libinput.
|
||||
|
||||
.SH SCROLL PIXEL DISTANCE
|
||||
The X server does not support per-pixel scrolling but it does support
|
||||
smooth scrolling. All scroll events however are based around a logical
|
||||
unit of scrolling (traditionally corresponding to a wheel click).
|
||||
smooth scrolling.
|
||||
All scroll events however are based around a logical unit of scrolling
|
||||
(traditionally corresponding to a wheel click).
|
||||
It is thus not possible to scroll by 10 pixels, but it is possible for a
|
||||
driver to scroll by 1/10th of a logical wheel click.
|
||||
.PP
|
||||
libinput provides scroll data in pixels. The \fBScrollPixelDistance\fR
|
||||
option defines the amount of movement equivalent to one wheel click. For
|
||||
example, a value of 50 means the user has to move a finger by 50 pixels to
|
||||
libinput provides scroll data in pixels.
|
||||
The \fBScrollPixelDistance\fR option defines the amount of movement equivalent
|
||||
to one wheel click.
|
||||
For example, a value of 50 means the user has to move a finger by 50 pixels to
|
||||
generate one logical click event and each pixel is 1/50th of a wheel click.
|
||||
|
||||
.SH CUSTOM ACCELERATION PROFILE
|
||||
The custom pointer acceleration profile gives users full control over the
|
||||
acceleration behavior at different speeds. libinput exposes an acceleration
|
||||
function f(x) where the x-axis is the device speed in device units per millisecond
|
||||
acceleration behavior at different speeds.
|
||||
libinput exposes an acceleration function \fIf(x)\fP
|
||||
where the x-axis is the device speed in device units per millisecond
|
||||
and the y-axis is the pointer speed.
|
||||
.PP
|
||||
The custom acceleration function is defined using n points which are spaced
|
||||
@@ -503,9 +570,11 @@ Thus the points defining the custom function are:
|
||||
(0 * step, f[0]), (1 * step, f[1]), ..., ((n-1) * step, f[n-1])
|
||||
.EE
|
||||
When a velocity value does not lie exactly on those points,
|
||||
a linear interpolation/extrapolation of the two closest points will be calculated.
|
||||
a linear interpolation/extrapolation of the two closest points
|
||||
will be calculated.
|
||||
.PP
|
||||
There are 3 custom acceleration function, which are used for different movement types:
|
||||
There are 3 custom acceleration functions,
|
||||
which are used for different movement types:
|
||||
.TS
|
||||
tab(;) allbox;
|
||||
l l l.
|
||||
@@ -515,16 +584,20 @@ Motion; Used for pointer motion; All devices
|
||||
Scroll; Used for scroll movement; Mouse, Touchpad
|
||||
.TE
|
||||
.PP
|
||||
See libinput library documentation of more details:
|
||||
See libinput library documentation for more details:
|
||||
https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html#the-custom-acceleration-profile
|
||||
|
||||
.SH BUGS
|
||||
This driver does not work with \fBOption \*qDevice\*q\fR set to an event
|
||||
node in \fI/dev/input/by-id\fR and \fI/dev/input/by-path\fR. This can be
|
||||
usually be worked by using \fBSection \*qInputClass\*q\fR with an
|
||||
appropriate \fBMatch*\fR statement in the xorg.conf(5).
|
||||
node in \fI/dev/input/by-id\fR and \fI/dev/input/by-path\fR.
|
||||
This can be usually be worked by using \fBSection \*qInputClass\*q\fR with an
|
||||
appropriate \fBMatch*\fR statement in the
|
||||
.BR xorg.conf (5).
|
||||
|
||||
.SH AUTHORS
|
||||
Peter Hutterer
|
||||
.SH "SEE ALSO"
|
||||
Xorg(1), xorg.conf(5), Xserver(1), X(7)
|
||||
.BR Xorg (1),
|
||||
.BR xorg.conf (5),
|
||||
.BR Xserver (1),
|
||||
.BR X (7)
|
||||
|
||||
@@ -146,6 +146,8 @@ configure_file(
|
||||
install_dir: dir_man4
|
||||
)
|
||||
|
||||
install_headers('include/libinput-properties.h', install_dir: dir_headers)
|
||||
|
||||
install_data('conf/40-libinput.conf', install_dir: dir_xorg_conf)
|
||||
|
||||
# Now generate config.h
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "util-strings.h"
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config.h"
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
@@ -100,47 +97,6 @@ safe_strdup(const char *str)
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple wrapper for asprintf that ensures the passed in-pointer is set
|
||||
* to NULL upon error.
|
||||
* The standard asprintf() call does not guarantee the passed in pointer
|
||||
* will be NULL'ed upon failure, whereas this wrapper does.
|
||||
*
|
||||
* @param strp pointer to set to newly allocated string.
|
||||
* This pointer should be passed to free() to release when done.
|
||||
* @param fmt the format string to use for printing.
|
||||
* @return The number of bytes printed (excluding the null byte terminator)
|
||||
* upon success or -1 upon failure. In the case of failure the pointer is set
|
||||
* to NULL.
|
||||
*/
|
||||
__attribute__ ((format (printf, 2, 3)))
|
||||
static inline int
|
||||
xasprintf(char **strp, const char *fmt, ...)
|
||||
{
|
||||
int rc = 0;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
rc = vasprintf(strp, fmt, args);
|
||||
va_end(args);
|
||||
if ((rc == -1) && strp)
|
||||
*strp = NULL;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
__attribute__ ((format (printf, 2, 0)))
|
||||
static inline int
|
||||
xvasprintf(char **strp, const char *fmt, va_list args)
|
||||
{
|
||||
int rc = 0;
|
||||
rc = vasprintf(strp, fmt, args);
|
||||
if ((rc == -1) && strp)
|
||||
*strp = NULL;
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
safe_atoi_base(const char *str, int *val, int base)
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -52,6 +53,8 @@
|
||||
#define TOUCH_MAX_SLOTS 15
|
||||
#define XORG_KEYCODE_OFFSET 8
|
||||
#define SCROLL_INCREMENT 15
|
||||
#define SCROLL_FACTOR_MIN 0.0001
|
||||
#define SCROLL_FACTOR_MAX 1000.0
|
||||
#define TOUCHPAD_SCROLL_DIST_MIN 10 /* in libinput pixels */
|
||||
#define TOUCHPAD_SCROLL_DIST_MAX 50 /* in libinput pixels */
|
||||
|
||||
@@ -175,6 +178,7 @@ struct xf86libinput {
|
||||
CARD32 scroll_button; /* xorg button number */
|
||||
BOOL scroll_buttonlock;
|
||||
uint32_t scroll_pixel_distance;
|
||||
float scroll_factor;
|
||||
float speed;
|
||||
float matrix[9];
|
||||
enum libinput_config_scroll_method scroll_method;
|
||||
@@ -463,7 +467,7 @@ xf86libinput_set_pressurecurve(struct xf86libinput *driver_data,
|
||||
|
||||
static inline bool
|
||||
xf86libinput_set_pressure_range(struct xf86libinput *driver_data,
|
||||
const struct range *range)
|
||||
const struct range *rangeopt)
|
||||
{
|
||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||
@@ -473,8 +477,8 @@ xf86libinput_set_pressure_range(struct xf86libinput *driver_data,
|
||||
|
||||
return libinput_tablet_tool_config_pressure_range_is_available(tool) &&
|
||||
libinput_tablet_tool_config_pressure_range_set(tool,
|
||||
range->min,
|
||||
range->max) == LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
rangeopt->min,
|
||||
rangeopt->max) == LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
@@ -831,7 +835,9 @@ LibinputApplyConfigClickMethod(DeviceIntPtr dev,
|
||||
struct libinput_device *device)
|
||||
{
|
||||
InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
#if HAVE_LIBINPUT_CLICKFINGER_BUTTON_MAP
|
||||
uint32_t click_methods = libinput_device_config_click_get_methods(device);
|
||||
#endif
|
||||
|
||||
if (!subdevice_has_capabilities(dev, CAP_POINTER))
|
||||
return;
|
||||
@@ -933,16 +939,16 @@ LibinputApplyConfigPressureRange(DeviceIntPtr dev,
|
||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||
InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||
struct range *range = &driver_data->options.pressure_range;
|
||||
struct range *rangeopt = &driver_data->options.pressure_range;
|
||||
|
||||
if (!subdevice_has_capabilities(dev, CAP_TABLET_TOOL))
|
||||
return;
|
||||
|
||||
if (tool && libinput_tablet_tool_config_pressure_range_is_available(tool) &&
|
||||
libinput_tablet_tool_config_pressure_range_set(tool, range->min, range->max) != LIBINPUT_CONFIG_STATUS_SUCCESS)
|
||||
libinput_tablet_tool_config_pressure_range_set(tool, rangeopt->min, rangeopt->max) != LIBINPUT_CONFIG_STATUS_SUCCESS)
|
||||
xf86IDrvMsg(pInfo, X_ERROR,
|
||||
"Failed to set PressureRange to %.2f..%.2f\n",
|
||||
range->min, range->max);
|
||||
rangeopt->min, rangeopt->max);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1911,6 +1917,7 @@ calculate_axis_value(struct xf86libinput *driver_data,
|
||||
value = value/dist * SCROLL_INCREMENT * 8;
|
||||
}
|
||||
|
||||
value *= driver_data->options.scroll_factor;
|
||||
*value_out = value;
|
||||
|
||||
return true;
|
||||
@@ -3433,6 +3440,20 @@ xf86libinput_parse_scroll_pixel_distance_option(InputInfoPtr pInfo,
|
||||
return dist;
|
||||
}
|
||||
|
||||
static inline double
|
||||
xf86libinput_parse_scroll_factor_option(InputInfoPtr pInfo,
|
||||
struct libinput_device *device)
|
||||
{
|
||||
const double scroll_factor_default = 1.0;
|
||||
double scroll_factor = xf86SetRealOption(pInfo->options, "ScrollFactor", scroll_factor_default);
|
||||
if (scroll_factor < SCROLL_FACTOR_MIN || scroll_factor > SCROLL_FACTOR_MAX) {
|
||||
xf86IDrvMsg(pInfo, X_ERROR, "Invalid ScrollFactor %f, expected to be between %f and %f\n",
|
||||
scroll_factor, SCROLL_FACTOR_MIN, SCROLL_FACTOR_MAX);
|
||||
scroll_factor = scroll_factor_default;
|
||||
}
|
||||
return scroll_factor;
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
xf86libinput_parse_clickmethod_option(InputInfoPtr pInfo,
|
||||
struct libinput_device *device)
|
||||
@@ -3664,7 +3685,7 @@ out:
|
||||
static void
|
||||
xf86libinput_parse_pressure_range_option(InputInfoPtr pInfo,
|
||||
struct xf86libinput *driver_data,
|
||||
struct range *range)
|
||||
struct range *rangeopt)
|
||||
{
|
||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||
@@ -3672,8 +3693,8 @@ xf86libinput_parse_pressure_range_option(InputInfoPtr pInfo,
|
||||
char *str;
|
||||
int rc;
|
||||
|
||||
range->min = 0.0;
|
||||
range->max = 1.0;
|
||||
rangeopt->min = 0.0;
|
||||
rangeopt->max = 1.0;
|
||||
|
||||
if ((driver_data->capabilities & CAP_TABLET_TOOL) == 0)
|
||||
return;
|
||||
@@ -3694,8 +3715,8 @@ xf86libinput_parse_pressure_range_option(InputInfoPtr pInfo,
|
||||
if (min < 0.0 || max > 1.0 || min >= max)
|
||||
goto out;
|
||||
|
||||
range->min = min;
|
||||
range->max = max;
|
||||
rangeopt->min = min;
|
||||
rangeopt->max = max;
|
||||
out:
|
||||
free(str);
|
||||
#endif
|
||||
@@ -3772,6 +3793,7 @@ xf86libinput_parse_options(InputInfoPtr pInfo,
|
||||
options->scroll_button = xf86libinput_parse_scrollbutton_option(pInfo, device);
|
||||
options->scroll_buttonlock = xf86libinput_parse_scrollbuttonlock_option(pInfo, device);
|
||||
options->scroll_pixel_distance = xf86libinput_parse_scroll_pixel_distance_option(pInfo, device);
|
||||
options->scroll_factor = xf86libinput_parse_scroll_factor_option(pInfo, device);
|
||||
options->click_method = xf86libinput_parse_clickmethod_option(pInfo, device);
|
||||
#if HAVE_LIBINPUT_CLICKFINGER_BUTTON_MAP
|
||||
options->clickfinger_button_map = xf86libinput_parse_clickfinger_map_option(pInfo, device);
|
||||
@@ -4255,6 +4277,8 @@ static Atom prop_scroll_buttonlock;
|
||||
static Atom prop_scroll_buttonlock_default;
|
||||
static Atom prop_scroll_pixel_distance;
|
||||
static Atom prop_scroll_pixel_distance_default;
|
||||
static Atom prop_scroll_factor;
|
||||
static Atom prop_scroll_factor_default;
|
||||
static Atom prop_click_methods_available;
|
||||
static Atom prop_click_method_enabled;
|
||||
static Atom prop_click_method_default;
|
||||
@@ -5245,6 +5269,34 @@ LibinputSetPropertyScrollPixelDistance(DeviceIntPtr dev,
|
||||
return Success;
|
||||
}
|
||||
|
||||
static inline int
|
||||
LibinputSetPropertyScrollFactor(DeviceIntPtr dev,
|
||||
Atom atom,
|
||||
XIPropertyValuePtr val,
|
||||
BOOL checkonly)
|
||||
{
|
||||
InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
struct xf86libinput *driver_data = pInfo->private;
|
||||
float *scroll_factor;
|
||||
|
||||
if (val->format != 32 || val->size != 1 || val->type != prop_float)
|
||||
return BadMatch;
|
||||
|
||||
scroll_factor = (float*)val->data;
|
||||
|
||||
if (checkonly) {
|
||||
if (*scroll_factor < SCROLL_FACTOR_MIN || *scroll_factor > SCROLL_FACTOR_MAX)
|
||||
return BadValue;
|
||||
|
||||
if (!xf86libinput_check_device(dev, atom))
|
||||
return BadMatch;
|
||||
} else {
|
||||
driver_data->options.scroll_factor = *scroll_factor;
|
||||
}
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
static inline int
|
||||
LibinputSetPropertyRotationAngle(DeviceIntPtr dev,
|
||||
Atom atom,
|
||||
@@ -5332,28 +5384,28 @@ LibinputSetPropertyPressureRange(DeviceIntPtr dev,
|
||||
InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
struct xf86libinput *driver_data = pInfo->private;
|
||||
float *vals;
|
||||
struct range range = { 0.0, 1.0 };
|
||||
struct range rangeopt = { 0.0, 1.0 };
|
||||
|
||||
if (val->format != 32 || val->size != 2 || val->type != prop_float)
|
||||
return BadMatch;
|
||||
|
||||
vals = val->data;
|
||||
range.min = vals[0];
|
||||
range.max = vals[1];
|
||||
rangeopt.min = vals[0];
|
||||
rangeopt.max = vals[1];
|
||||
|
||||
if (checkonly) {
|
||||
if (range.min < 0.0 || range.max > 1.0 || range.min >= range.max)
|
||||
if (rangeopt.min < 0.0 || rangeopt.max > 1.0 || rangeopt.min >= rangeopt.max)
|
||||
return BadValue;
|
||||
|
||||
/* Disallow reducing the range to less than 20% of the range, mostly
|
||||
* to avoid footguns */
|
||||
if (range.max - range.min < 0.2)
|
||||
if (rangeopt.max - rangeopt.min < 0.2)
|
||||
return BadValue;
|
||||
|
||||
if (!xf86libinput_check_device(dev, atom))
|
||||
return BadMatch;
|
||||
} else {
|
||||
driver_data->options.pressure_range = range;
|
||||
driver_data->options.pressure_range = rangeopt;
|
||||
}
|
||||
|
||||
return Success;
|
||||
@@ -5500,6 +5552,8 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom,
|
||||
rc = LibinputSetPropertyHorizScroll(dev, atom, val, checkonly);
|
||||
else if (atom == prop_scroll_pixel_distance)
|
||||
rc = LibinputSetPropertyScrollPixelDistance(dev, atom, val, checkonly);
|
||||
else if (atom == prop_scroll_factor)
|
||||
rc = LibinputSetPropertyScrollFactor(dev, atom, val, checkonly);
|
||||
else if (atom == prop_mode_groups) {
|
||||
InputInfoPtr pInfo = dev->public.devicePrivate;
|
||||
struct xf86libinput *driver_data = pInfo->private;
|
||||
@@ -5541,6 +5595,7 @@ LibinputSetProperty(DeviceIntPtr dev, Atom atom,
|
||||
atom == prop_scroll_method_default ||
|
||||
atom == prop_scroll_methods_available ||
|
||||
atom == prop_scroll_pixel_distance_default ||
|
||||
atom == prop_scroll_factor_default ||
|
||||
atom == prop_sendevents_available ||
|
||||
atom == prop_sendevents_default ||
|
||||
atom == prop_serial ||
|
||||
@@ -6153,6 +6208,32 @@ LibinputInitScrollPixelDistanceProperty(DeviceIntPtr dev,
|
||||
1, &dist);
|
||||
}
|
||||
|
||||
static void
|
||||
LibinputInitScrollFactorProperty(DeviceIntPtr dev,
|
||||
struct xf86libinput *driver_data,
|
||||
struct libinput_device *device)
|
||||
{
|
||||
float scroll_factor = driver_data->options.scroll_factor;
|
||||
|
||||
if (!subdevice_has_capabilities(dev, CAP_POINTER))
|
||||
return;
|
||||
|
||||
prop_scroll_factor = LibinputMakeProperty(dev,
|
||||
LIBINPUT_PROP_SCROLL_FACTOR,
|
||||
prop_float, 32,
|
||||
1, &scroll_factor);
|
||||
if (!prop_scroll_factor)
|
||||
return;
|
||||
|
||||
prop_scroll_factor_default = LibinputMakeProperty(dev,
|
||||
LIBINPUT_PROP_SCROLL_FACTOR_DEFAULT,
|
||||
prop_float, 32,
|
||||
1, &scroll_factor);
|
||||
|
||||
if (!prop_scroll_factor_default)
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
LibinputInitClickMethodsProperty(DeviceIntPtr dev,
|
||||
struct xf86libinput *driver_data,
|
||||
@@ -6582,10 +6663,10 @@ LibinputInitPressureRangeProperty(DeviceIntPtr dev,
|
||||
{
|
||||
#if HAVE_LIBINPUT_PRESSURE_RANGE
|
||||
struct libinput_tablet_tool *tool = driver_data->tablet_tool;
|
||||
const struct range *range = &driver_data->options.pressure_range;
|
||||
const struct range *rangeopt = &driver_data->options.pressure_range;
|
||||
float data[2] = {
|
||||
range->min,
|
||||
range->max,
|
||||
rangeopt->min,
|
||||
rangeopt->max,
|
||||
};
|
||||
|
||||
if ((driver_data->capabilities & CAP_TABLET_TOOL) == 0)
|
||||
@@ -6698,6 +6779,7 @@ LibinputInitProperty(DeviceIntPtr dev)
|
||||
LibinputInitNaturalScrollProperty(dev, driver_data, device);
|
||||
LibinputInitDisableWhileTypingProperty(dev, driver_data, device);
|
||||
LibinputInitScrollMethodsProperty(dev, driver_data, device);
|
||||
LibinputInitScrollFactorProperty(dev, driver_data, device);
|
||||
LibinputInitClickMethodsProperty(dev, driver_data, device);
|
||||
LibinputInitClickfingerButtonmapProperty(dev, driver_data, device);
|
||||
LibinputInitMiddleEmulationProperty(dev, driver_data, device);
|
||||
|
||||
Reference in New Issue
Block a user