Initialize floating_geometry on property::border_width signal (FS#826)

Initializing the client property "floating_geometry" on the
property::geometry signal is problematic since this is emitted before
client_set_border_width(), causing the internal client geometry to get
stored and later passed to client:geometry() which assumes it includes
titlebar and borders.

Signed-off-by: Corey Thompson <cmtptr@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Corey Thompson 2011-12-08 21:45:59 -05:00 committed by Uli Schlachter
parent 3762cbd5c7
commit 8c62698bf6
1 changed files with 2 additions and 2 deletions

View File

@ -580,9 +580,9 @@ end
capi.client.connect_signal("new", function(c) capi.client.connect_signal("new", function(c)
local function store_init_geometry(c) local function store_init_geometry(c)
property.set(c, "floating_geometry", c:geometry()) property.set(c, "floating_geometry", c:geometry())
c:disconnect_signal("property::geometry", store_init_geometry) c:disconnect_signal("property::border_width", store_init_geometry)
end end
c:connect_signal("property::geometry", store_init_geometry) c:connect_signal("property::border_width", store_init_geometry)
end) end)
capi.client.connect_signal("manage", function(c) capi.client.connect_signal("manage", function(c)