awful.client: fix initial geometry storage (FS#608)

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-09-22 15:56:58 +02:00
parent e4df381c3e
commit 9388dc5a1e
1 changed files with 10 additions and 5 deletions

View File

@ -568,12 +568,17 @@ local function store_floating_geometry(c)
end
end
capi.client.add_signal("manage", function(c)
-- Store the initial client geometry.
capi.client.add_signal("new", function(c)
local function store_init_geometry(c)
property.set(c, "floating_geometry", c:geometry())
c:add_signal("property::x", store_floating_geometry)
c:add_signal("property::y", store_floating_geometry)
c:add_signal("property::width", store_floating_geometry)
c:add_signal("property::height", store_floating_geometry)
c:remove_signal("property::geometry", store_init_geometry)
end
c:add_signal("property::geometry", store_init_geometry)
end)
capi.client.add_signal("manage", function(c)
c:add_signal("property::geometry", store_floating_geometry)
end)
--- Return if a client has a fixe size or not.