[output] bugfix: enable scroll-wheeling again

The callback registration/lookup logic was flawed, so that callbacks
without module name were never executed.
This commit is contained in:
Tobias Witek 2016-11-05 16:39:46 +01:00
parent 4e0e3ef427
commit 6eea8da1af

View file

@ -74,8 +74,12 @@ class Output(object):
module = event.get("instance", event.get("name", None))
cb = self._callbacks.get((
event.get("button", -1),
module,
None,
), None)
cb = self._callbacks.get((
event.get("button", -1),
event.get("instance", event.get("name", None)),
), cb)
if inspect.isfunction(cb) or cb is None: return cb
return Command(cb)