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:
parent
3d60aa7d83
commit
878f9e7580
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue