titlebar: don't resize window when adding titlebar.
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
ef6d6dd12c
commit
2e8071efae
|
@ -117,18 +117,8 @@ function add(c, args)
|
||||||
tb.widgets = { appicon = appicon, title = title,
|
tb.widgets = { appicon = appicon, title = title,
|
||||||
closef = closef, close = close }
|
closef = closef, close = close }
|
||||||
|
|
||||||
-- Store old geometry (including borders)
|
|
||||||
local old_geom = c:geometry()
|
|
||||||
|
|
||||||
c.titlebar = tb
|
c.titlebar = tb
|
||||||
|
|
||||||
-- Resize the client so the same amount of space is occupied as before.
|
|
||||||
-- But not when it's a dialog, because applications remember this new size.
|
|
||||||
-- And everytime you open the dialog it shrinks further.
|
|
||||||
if c.type ~= "dialog" then
|
|
||||||
c:geometry(old_geom)
|
|
||||||
end
|
|
||||||
|
|
||||||
update(c)
|
update(c)
|
||||||
update(c, "geometry")
|
update(c, "geometry")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue