fix #420 (clients menu does not reopen instantly after closewith ESC)
This commit is contained in:
parent
475358050a
commit
09de5c8f53
|
@ -73,6 +73,18 @@ awful.layout.layouts = {
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Helper functions
|
||||||
|
local client_menu_instance = nil
|
||||||
|
local function client_menu_toggle()
|
||||||
|
if client_menu_instance and client_menu_instance.wibox.visible then
|
||||||
|
client_menu_instance:hide()
|
||||||
|
client_menu_instance = nil
|
||||||
|
else
|
||||||
|
client_menu_instance = awful.menu.clients({ theme = { width = 250 } })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Wallpaper
|
-- {{{ Wallpaper
|
||||||
if beautiful.wallpaper then
|
if beautiful.wallpaper then
|
||||||
for s = 1, screen.count() do
|
for s = 1, screen.count() do
|
||||||
|
@ -130,7 +142,8 @@ mytaglist.buttons = awful.util.table.join(
|
||||||
awful.button({ modkey }, 3, awful.client.toggletag),
|
awful.button({ modkey }, 3, awful.client.toggletag),
|
||||||
awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
|
awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
|
||||||
awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
|
awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
|
||||||
)
|
)
|
||||||
|
|
||||||
mytasklist = {}
|
mytasklist = {}
|
||||||
mytasklist.buttons = awful.util.table.join(
|
mytasklist.buttons = awful.util.table.join(
|
||||||
awful.button({ }, 1, function (c)
|
awful.button({ }, 1, function (c)
|
||||||
|
@ -150,14 +163,7 @@ mytasklist.buttons = awful.util.table.join(
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
awful.button({ }, 3, function ()
|
awful.button({ }, 3, function ()
|
||||||
if instance then
|
client_menu_toggle()
|
||||||
instance:hide()
|
|
||||||
instance = nil
|
|
||||||
else
|
|
||||||
instance = awful.menu.clients({
|
|
||||||
theme = { width = 250 }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end),
|
end),
|
||||||
awful.button({ }, 4, function ()
|
awful.button({ }, 4, function ()
|
||||||
awful.client.focus.byidx(1)
|
awful.client.focus.byidx(1)
|
||||||
|
|
Loading…
Reference in New Issue