[bumblebee] add small sleep before update
in some situations/modules (spotify, playerctl, etc.), it is possible that a state change (e.g. play/pause) takes a small time to actually propagate into the whole system (e.g. until the next "update" retrieves the correct value). To alleviate that, add a very small delay to the update.
This commit is contained in:
parent
8a4fc40947
commit
806b97895e
1 changed files with 2 additions and 0 deletions
|
@ -68,6 +68,8 @@ def handle_input(output, update_lock):
|
|||
modules[event["name"]] = True
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
time.sleep(0.2)
|
||||
if update_lock.acquire(blocking=False) == True:
|
||||
core.event.trigger("update", modules.keys(), force=True)
|
||||
core.event.trigger("draw")
|
||||
|
|
Loading…
Reference in a new issue