Activate keygrabber only when add_item() used
As title says, keygrabber should not be enabled by default.
Could be fixed as a "oneliner" in base.lua, but this code has key to be rewritten/refactored as most of Radical code already has been redone.
TODO:
- move the keyboard code into it's own file instead of a mix of
base.luaandlayout/ - use metatable
__indexand__new_indexto catch hook changes
The keygrabber should run when one of these condition is true:
- there is items
- there is a keyboard hook
- filter is enabled
As for use cases where there is only widgets and no items. Those should be upstreamed into wibox itself as it doesn't use 99% of Radical code. I merged a lot of shape related code already and part 4 (of 4) of the "upstream shape API" PR serie is in my awesome fork, but isn't currently planned for 3.6. This may change if there is further 3.6 delays. Uli isn't yet happy enough with the multi screen support and prefer to wait for more feedbacks. I still have to fix some shaped client and wibox code before adding it to the branch. It is actually a lot more complicated than it sounds (due to compositing and anti-aliasing, X11 spec idiocies and render pipeline).