awful.client: store floating geometry of clients in awful

Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Gregor Best 2009-03-12 20:11:52 +01:00 committed by Julien Danjou
parent 2d816fd80c
commit f0ca12837a
1 changed files with 15 additions and 0 deletions

View File

@ -550,11 +550,26 @@ function floating.set(c, s)
local c = c or capi.client.focus
if c and property.get(c, "floating") ~= s then
property.set(c, "floating", s)
local screen = c.screen
if s == true then
c:geometry(property.get(c, "floating_geometry"))
end
c.screen = screen
capi.hooks.arrange()(c.screen)
capi.hooks.property()(c, "floating")
end
end
hooks.manage.register(function (c)
property.set(c, "floating_geometry", c:geometry())
end)
hooks.property.register(function (c, prop)
if prop == "geometry" and floating.get(c) then
property.set(c, "floating_geometry", c:geometry())
end
end)
--- Return if a client has a fixe size or not.
-- @param c The client.
function isfixed(c)