[core/input] add default workspace wrap bindings (mouse wheel up/down)

This commit is contained in:
tobi-wan-kenobi 2020-05-02 13:54:45 +02:00
parent d0bb0f9b7a
commit ba24ba13db
4 changed files with 15 additions and 5 deletions

View file

@ -12,10 +12,14 @@ def clear():
__callbacks.clear()
def trigger(event, *args, **kwargs):
for callback in __callbacks.get(event, []):
cb = __callbacks.get(event, [])
if len(cb) == 0: return False
for callback in cb:
if len(args) + len(kwargs) == 0:
callback()
else:
callback(*args, **kwargs)
return True
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4