Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/35'
Browse files Browse the repository at this point in the history
* origin/pr/35:
  ci: drop R4.1, add R4.3
  Fix parsing device capabilities

Pull request description:

It's ascii, not binary. Fortunately, for mouse reporting relative or
absolute X,Y events only the result is the same.

QubesOS/qubes-issues#9563
  • Loading branch information
marmarek committed Nov 22, 2024
2 parents cd5e5f2 + 15acdb2 commit 0f0a80d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
include:
- file: /r4.1/gitlab-base.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.1/gitlab-dom0.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.1/gitlab-vm.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.2/gitlab-base.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.2/gitlab-host.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.2/gitlab-vm.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.3/gitlab-base.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.3/gitlab-host.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.3/gitlab-vm.yml
project: QubesOS/qubes-continuous-integration
10 changes: 5 additions & 5 deletions qubes-rpc/qubes-input-trigger
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def get_service_name(udevreturn, input_dev):
try:
devpath = [line.split("=", 1)[1] for line in udevreturn.splitlines()
if line.startswith("DEVPATH=")][0]
with open(f"/sys/{devpath}/device/capabilities/abs", "rb") as f:
abs_bytes = f.read()
# we care about only the first byte - that's where X,Y axies are
abs_caps = abs_bytes[0]
except (IndexError, FileNotFoundError):
with open(f"/sys/{devpath}/device/capabilities/abs", "r") as f:
abs_string = f.read().strip()
# we care about only the last byte - that's where X,Y axies are
abs_caps = int(abs_string.split()[-1], 16)
except (IndexError, FileNotFoundError, ValueError):
abs_caps = 0
if (
('ID_INPUT_TABLET' in udevreturn) or
Expand Down

0 comments on commit 0f0a80d

Please sign in to comment.