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:
parent
2d816fd80c
commit
f0ca12837a
|
@ -550,11 +550,26 @@ function floating.set(c, s)
|
||||||
local c = c or capi.client.focus
|
local c = c or capi.client.focus
|
||||||
if c and property.get(c, "floating") ~= s then
|
if c and property.get(c, "floating") ~= s then
|
||||||
property.set(c, "floating", s)
|
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.arrange()(c.screen)
|
||||||
capi.hooks.property()(c, "floating")
|
capi.hooks.property()(c, "floating")
|
||||||
end
|
end
|
||||||
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.
|
--- Return if a client has a fixe size or not.
|
||||||
-- @param c The client.
|
-- @param c The client.
|
||||||
function isfixed(c)
|
function isfixed(c)
|
||||||
|
|
Loading…
Reference in New Issue