rc.lua: Do not hardcode the default client buttons.
This commit moves the previously hardcoded client button list to the `awful.client` default button set. This will allow modules to add their own buttons. In later commit, those default buttons will also be added dynamically to existing clients.
This commit is contained in:
parent
44a665d381
commit
767a8e4f6d
|
@ -437,19 +437,21 @@ awful.keyboard.append_global_keybindings({
|
|||
})
|
||||
|
||||
-- @DOC_CLIENT_BUTTONS@
|
||||
clientbuttons = {
|
||||
awful.button({ }, 1, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
end),
|
||||
awful.button({ modkey }, 1, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
awful.mouse.client.move(c)
|
||||
end),
|
||||
awful.button({ modkey }, 3, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
awful.mouse.client.resize(c)
|
||||
end),
|
||||
}
|
||||
client.connect_signal("request::default_mousebindings", function()
|
||||
awful.mouse.append_client_mousebindings({
|
||||
awful.button({ }, 1, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
end),
|
||||
awful.button({ modkey }, 1, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
awful.mouse.client.move(c)
|
||||
end),
|
||||
awful.button({ modkey }, 3, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
awful.mouse.client.resize(c)
|
||||
end),
|
||||
})
|
||||
end)
|
||||
|
||||
-- }}}
|
||||
|
||||
|
@ -465,7 +467,6 @@ awful.rules.rules = {
|
|||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
keys = clientkeys,
|
||||
buttons = clientbuttons,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue