Default config: Unify mouse dragging behavior

When moving or resizing a client by dragging its titlebar with mouse,
the client is automatically focused and raised. However, this behavior
is not replicated by tne other dragging method, i.e. grabbing it with
mouse while pressing the modkey. Sometimes, this causes a client to
disappear below another one while moving.

This commit unifies handling of dragging clients with mouse, by ensuring
that the client is focused and raised, whichever dragging method is
used. The fix applies both to moving and resizing clients.

Signed-off-by: Piotr Śliwka <contact@psliwka.info>
This commit is contained in:
Piotr Śliwka 2018-05-31 17:47:59 +02:00
parent 7e529eeab2
commit a228696637
No known key found for this signature in database
GPG Key ID: 33974545CA8D4287
1 changed files with 11 additions and 2 deletions

View File

@ -459,8 +459,17 @@ end
-- @DOC_CLIENT_BUTTONS@
clientbuttons = gears.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 }, 1, function (c)
client.focus = c
c:raise()
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function (c)
client.focus = c
c:raise()
awful.mouse.client.resize(c)
end)
)
-- Set keys
root.keys(globalkeys)