titlebar: remove some old/unneeded code

- This fixes the resize upon titlebar removal issue.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Maarten Maathuis 2009-02-07 15:31:51 +01:00 committed by Julien Danjou
parent a47d0d9924
commit 247852f4de
1 changed files with 0 additions and 15 deletions

View File

@ -120,7 +120,6 @@ function add(c, args)
c.titlebar = tb
update(c)
update(c, "geometry")
end
--- Update a titlebar. This should be called in some hooks.
@ -137,17 +136,6 @@ function update(c, prop)
if widgets.appicon then
widgets.appicon.image = c.icon
end
elseif prop == "geometry" then
if data[c].width then
if c.titlebar.position == "top"
or c.titlebar.position == "bottom" then
local w = math.min(data[c].width, c:geometry().width)
c.titlebar:geometry({ width = w })
else
local w = math.min(data[c].width, c:geometry().height)
c.titlebar:geometry({ height = w })
end
end
end
if capi.client.focus == c then
c.titlebar.fg = data[c].fg_focus
@ -166,11 +154,8 @@ end
--- Remove a titlebar from a client.
-- @param c The client.
function remove(c)
local old_geom = c:geometry()
c.titlebar = nil
data[c] = nil
-- Resize the client so the same amount of space is occupied as before.
c:geometry(old_geom)
end
-- Register standards hooks