Add finish callback to awful.mouse.client.move
This commit is contained in:
parent
66c4ff7f2c
commit
462055cb36
|
@ -155,7 +155,10 @@ end
|
||||||
--- Move a client.
|
--- Move a client.
|
||||||
-- @param c The client to move, or the focused one if nil.
|
-- @param c The client to move, or the focused one if nil.
|
||||||
-- @param snap The pixel to snap clients.
|
-- @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
|
local c = c or capi.client.focus
|
||||||
|
|
||||||
if not c
|
if not c
|
||||||
|
@ -206,6 +209,9 @@ function mouse.client.move(c, snap)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if finished_cb then
|
||||||
|
finished_cb(c)
|
||||||
|
end
|
||||||
return false
|
return false
|
||||||
end, "fleur")
|
end, "fleur")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue