awful.menu: add keygrabber support to clients menu

Functions show() and toggle() accept a boolean parameter controlling
keyboard navigation. In case of the clients menu neither is called
directly, instead the clients menu is always re-created in case any
new clients appeard since the last invocation. This patch adds a
keygrabber parameter to the clients() function as well.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Adrian C. (anrxc) 2009-12-02 21:38:23 +01:00 committed by Julien Danjou
parent b0e2bf8b95
commit 39a0fba7a8
1 changed files with 3 additions and 2 deletions

View File

@ -269,8 +269,9 @@ end
--- Build a popup menu with running clients and shows it.
-- @param menu Menu table, see new() function for more informations
-- @param keygrabber A boolean enabling or not the keyboard navigation.
-- @return The menu.
function clients(menu)
function clients(menu, keygrabber)
local cls = capi.client.get()
local cls_t = {}
for k, c in pairs(cls) do
@ -291,7 +292,7 @@ function clients(menu)
menu.items = cls_t
local m = new(menu)
m:show()
m:show(keygrabber)
return m
end