parent
8ebea11df0
commit
3ffbe4c03b
|
@ -156,11 +156,12 @@ local function handler(_, client, context, args) --luacheck: no unused_args
|
||||||
capi.mousegrabber.run(function (_mouse)
|
capi.mousegrabber.run(function (_mouse)
|
||||||
if not client.valid then return end
|
if not client.valid then return end
|
||||||
|
|
||||||
-- Resize everytime the mouse moves (default behavior).
|
-- Resize everytime the mouse moves (default behavior) in live mode,
|
||||||
if args.mode == "live" then
|
-- otherwise keep the current geometry
|
||||||
-- Get the new geometry
|
geo = setmetatable(
|
||||||
geo = setmetatable(args.placement(client, args), {__index=args})
|
args.mode == "live" and args.placement(client, args) or client:geometry(),
|
||||||
end
|
{__index=args}
|
||||||
|
)
|
||||||
|
|
||||||
-- Execute the move callbacks. This can be used to add features such as
|
-- Execute the move callbacks. This can be used to add features such as
|
||||||
-- snap or adding fancy graphical effects.
|
-- snap or adding fancy graphical effects.
|
||||||
|
@ -182,7 +183,9 @@ local function handler(_, client, context, args) --luacheck: no unused_args
|
||||||
end
|
end
|
||||||
|
|
||||||
-- In case it was modified
|
-- In case it was modified
|
||||||
setmetatable(geo,{__index=args})
|
if geo then
|
||||||
|
setmetatable(geo, {__index=args})
|
||||||
|
end
|
||||||
|
|
||||||
if args.mode == "live" then
|
if args.mode == "live" then
|
||||||
-- Ask the resizing handler to resize the client
|
-- Ask the resizing handler to resize the client
|
||||||
|
|
Loading…
Reference in New Issue