From 230aac3bf5934e3fe91a21a634e881617ef4f317 Mon Sep 17 00:00:00 2001 From: Tobi <28510156+sezanzeb@users.noreply.github.com> Date: Sat, 1 Feb 2025 16:16:09 +0100 Subject: [PATCH] Fix rel_to_abs recentering (#1050) * Fix ci pipeline * Fix rel_to_abs_handler axis recentering --- .../injection/mapping_handlers/rel_to_abs_handler.py | 6 ++++-- scripts/ci-install-deps.sh | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py b/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py index ec6de883e..12810f21c 100644 --- a/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py +++ b/inputremapper/injection/mapping_handlers/rel_to_abs_handler.py @@ -205,7 +205,8 @@ async def _create_recenter_loop(self) -> None: await self._moving.wait() # input moving started while ( await asyncio.wait( - (self._moving.wait(),), timeout=self.mapping.release_timeout + (asyncio.create_task(self._moving.wait()),), + timeout=self.mapping.release_timeout, ) )[0]: self._moving.clear() # still moving @@ -229,7 +230,8 @@ def _write(self, value: int) -> None: """Inject.""" try: self.global_uinputs.write( - (*self._output_axis, value), self.mapping.target_uinput + (*self._output_axis, value), + self.mapping.target_uinput, ) except OverflowError: # screwed up the calculation of the event value diff --git a/scripts/ci-install-deps.sh b/scripts/ci-install-deps.sh index 6d0b6922b..e258c7fce 100755 --- a/scripts/ci-install-deps.sh +++ b/scripts/ci-install-deps.sh @@ -7,8 +7,7 @@ set -xeuo pipefail sudo apt-get install -y gettext python3-evdev python3-pydbus python3-pydantic python3-gi gir1.2-gtk-3.0 gir1.2-gtksource-4 # ensure pip and setuptools/wheel up to date so can install all pip modules -python -m pip install --upgrade pip -python -m pip install --upgrade --force-reinstall wheel setuptools +sudo apt-get install python3-pip python3-wheel python3-setuptools # install test deps which aren't in setup.py python -m pip install psutil pylint-pydantic