placement: Fix under_mouse
The function stopped actually setting the geometry... This was missed by tests because of an oversaw elsewhere.
This commit is contained in:
parent
45ff7efce5
commit
21c9766aa6
|
@ -234,22 +234,11 @@ function mouse.resize_handler(c, context, hints)
|
|||
local lay = c.screen.selected_tag.layout
|
||||
|
||||
if lay == layout.suit.floating or c.floating then
|
||||
local offset = hints and hints.offset or {}
|
||||
|
||||
if type(offset) == "number" then
|
||||
offset = {
|
||||
x = offset,
|
||||
y = offset,
|
||||
width = offset,
|
||||
height = offset,
|
||||
}
|
||||
end
|
||||
|
||||
c:geometry {
|
||||
x = hints.x + (offset.x or 0 ),
|
||||
y = hints.y + (offset.y or 0 ),
|
||||
width = hints.width + (offset.width or 0 ),
|
||||
height = hints.height + (offset.height or 0 ),
|
||||
x = hints.x,
|
||||
y = hints.y,
|
||||
width = hints.width,
|
||||
height = hints.height,
|
||||
}
|
||||
elseif lay.resize_handler then
|
||||
lay.resize_handler(c, context, hints)
|
||||
|
|
|
@ -144,15 +144,16 @@ local function compose(...)
|
|||
-- Only apply the geometry once, not once per chain node, to do this,
|
||||
-- Force the "pretend" argument and restore the original value for
|
||||
-- the last node.
|
||||
local pretend_real = args.pretend
|
||||
local attach_real = args.attach
|
||||
|
||||
args.pretend = true
|
||||
args.attach = false
|
||||
args.offset = {}
|
||||
|
||||
for k, f in ipairs(queue) do
|
||||
if k == #queue then
|
||||
args.pretend = pretend_real or false
|
||||
-- Let them fallback to the parent table
|
||||
args.pretend = nil
|
||||
args.offset = nil
|
||||
end
|
||||
|
||||
local r = {f(d, args, ...)}
|
||||
|
@ -802,6 +803,8 @@ function placement.under_mouse(d, args)
|
|||
ngeo.width = ngeo.width - 2*bw
|
||||
ngeo.height = ngeo.height - 2*bw
|
||||
|
||||
geometry_common(d, args, ngeo)
|
||||
|
||||
return fix_new_geometry(ngeo, args, true)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue