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:
parent
2fa20703ff
commit
cacba79d49
|
@ -580,9 +580,9 @@ end
|
|||
capi.client.add_signal("new", function(c)
|
||||
local function store_init_geometry(c)
|
||||
property.set(c, "floating_geometry", c:geometry())
|
||||
c:remove_signal("property::geometry", store_init_geometry)
|
||||
c:remove_signal("property::border_width", store_init_geometry)
|
||||
end
|
||||
c:add_signal("property::geometry", store_init_geometry)
|
||||
c:add_signal("property::border_width", store_init_geometry)
|
||||
end)
|
||||
|
||||
capi.client.add_signal("manage", function(c)
|
||||
|
|
Loading…
Reference in New Issue