mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Add finish callback to awful.mouse.client.move
This commit is contained in:
parent
66c4ff7f2c
commit
462055cb36
1 changed files with 7 additions and 1 deletions
|
@ -155,7 +155,10 @@ end
|
|||
--- Move a client.
|
||||
-- @param c The client to move, or the focused one if nil.
|
||||
-- @param snap The pixel to snap clients.
|
||||
function mouse.client.move(c, snap)
|
||||
-- @param finished_cb An optional callback function, that will be called
|
||||
-- when moving the client has been finished. The client
|
||||
-- that has been moved will be passed to that function.
|
||||
function mouse.client.move(c, snap, finished_cb)
|
||||
local c = c or capi.client.focus
|
||||
|
||||
if not c
|
||||
|
@ -206,6 +209,9 @@ function mouse.client.move(c, snap)
|
|||
return true
|
||||
end
|
||||
end
|
||||
if finished_cb then
|
||||
finished_cb(c)
|
||||
end
|
||||
return false
|
||||
end, "fleur")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue