mouse.move: Return the corner
This commit is contained in:
parent
6e354cd376
commit
e31563b056
|
@ -215,6 +215,7 @@ end
|
||||||
-- @param c The client to resize, or the focused one by default.
|
-- @param c The client to resize, or the focused one by default.
|
||||||
-- @tparam string corner The corner to grab on resize. Auto detected by default.
|
-- @tparam string corner The corner to grab on resize. Auto detected by default.
|
||||||
-- @tparam[opt={}] table args A set of `awful.placement` arguments
|
-- @tparam[opt={}] table args A set of `awful.placement` arguments
|
||||||
|
-- @treturn string The corner (or side) name
|
||||||
function mouse.client.resize(c, corner, args)
|
function mouse.client.resize(c, corner, args)
|
||||||
c = c or capi.client.focus
|
c = c or capi.client.focus
|
||||||
|
|
||||||
|
@ -230,9 +231,14 @@ function mouse.client.resize(c, corner, args)
|
||||||
-- Move the mouse to the corner
|
-- Move the mouse to the corner
|
||||||
if corner and aplace[corner] then
|
if corner and aplace[corner] then
|
||||||
aplace[corner](capi.mouse, {parent=c})
|
aplace[corner](capi.mouse, {parent=c})
|
||||||
|
else
|
||||||
|
local _
|
||||||
|
_, corner = aplace.closest_corner(capi.mouse, {parent=c})
|
||||||
end
|
end
|
||||||
|
|
||||||
mouse.resize(c, "mouse.resize", args or {include_sides=true})
|
mouse.resize(c, "mouse.resize", args or {include_sides=true})
|
||||||
|
|
||||||
|
return corner
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Default handler for `request::geometry` signals with `mouse.resize` context.
|
--- Default handler for `request::geometry` signals with `mouse.resize` context.
|
||||||
|
|
Loading…
Reference in New Issue