device: better gesture structure computation
This commit is contained in:
parent
7442c52c20
commit
56936a4d0a
|
@ -290,9 +290,9 @@ class Device:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def gestures(self):
|
def gestures(self):
|
||||||
if not self._gestures:
|
if self._gestures is None:
|
||||||
with self._gestures_lock:
|
with self._gestures_lock:
|
||||||
if not self._gestures:
|
if self._gestures is None:
|
||||||
if self.online and self.protocol >= 2.0:
|
if self.online and self.protocol >= 2.0:
|
||||||
self._gestures = _hidpp20.get_gestures(self) or ()
|
self._gestures = _hidpp20.get_gestures(self) or ()
|
||||||
return self._gestures
|
return self._gestures
|
||||||
|
|
Loading…
Reference in New Issue