device: add conditional delay to apply all to get around race with Linux driver

This commit is contained in:
Peter F. Patel-Schneider 2022-09-14 09:39:05 -04:00
parent f7898cd994
commit 5ed4c05db8
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ from logging import DEBUG as _DEBUG
from logging import WARNING as _WARNING
from logging import getLogger
from struct import unpack as _unpack
from time import sleep as _sleep
from . import hidpp20 as _hidpp20
from .common import NamedInt as _NamedInt
@ -1489,6 +1490,8 @@ class RawXYProcessing:
def apply_all_settings(device):
if device.features and _hidpp20.FEATURE.HIRES_WHEEL in device.features:
_sleep(0.2) # delay to try to get out of race condition with Linux HID++ driver
persister = getattr(device, 'persister', None)
sensitives = persister.get('_sensitive', {}) if persister else {}
for s in device.settings: