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 3d60aa7d83
commit 878f9e7580
1 changed files with 3 additions and 2 deletions

View File

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