Enhancements & Bug Fixes

- Line, and histogram data can now be accessed from their `data` methods.
- Fixed a bug causing `maximize` to fail if a screen is not specified
- Global events can now be coroutines or functions.
This commit is contained in:
louisnw
2023-10-21 14:13:11 +01:00
parent 2c27ad66eb
commit 5bb3739a40
4 changed files with 17 additions and 3 deletions

View File

@ -99,7 +99,11 @@ class Emitter:
return self
def _emit(self, *args):
self._callable(*args) if self._callable else None
if self._callable:
if asyncio.iscoroutinefunction(self._callable):
asyncio.create_task(self._callable(*args))
else:
self._callable(*args)
class JSEmitter: