Skip to content

Commit 2eca3d7

Browse files
committed
prevent wakeups due to touchpad mute
1 parent b4d44f4 commit 2eca3d7

File tree

1 file changed

+13
-1
lines changed
  • src/hhd/device/legion_go/slim

1 file changed

+13
-1
lines changed

src/hhd/device/legion_go/slim/base.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,10 @@ def prepare(m):
351351
prepare(d_xinput)
352352
prepare(d_shortcuts)
353353
if uses_touch:
354-
prepare(d_touch_mute)
354+
d_touch_mute.open()
355355
prepare(d_touch)
356+
else:
357+
d_touch_mute = None
356358
prepare(d_cfg)
357359
prepare(d_raw)
358360
for d in d_producers:
@@ -401,6 +403,16 @@ def prepare(m):
401403
if debug:
402404
raise e
403405

406+
if d_touch_mute:
407+
try:
408+
d_touch_mute.close(True)
409+
except Exception as e:
410+
logger.error(
411+
f"Error while closing touch mute device with exception:\n{e}"
412+
)
413+
if debug:
414+
raise e
415+
404416

405417
class SelectivePassthrough(Producer, Consumer):
406418

0 commit comments

Comments
 (0)