In Awesome 3.5.6, I have configured modkey + mouse wheel forward/backward to raise and lower the focused window, as follows:
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize),
awful.button({ modkey }, 4, function(c) c:raise() end),
awful.button({ modkey }, 5, function(c) c:lower() end))
-- ...
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons } },
-- ...
This is working fine, but the problem is that the mod+button4 event is propagating through to the client. E.g. in the case of Chrome, the browser window scrolls after being raised or lowered.
My question: how can I get Awesome to consume the mouse event and not propagate it to the client? I tried returning "true" or "false" from the function(c)
(as event-swallowing in indicated in some other contexts), but no luck.