At Thu, 12 Mar 2009 20:26:06 +0100 Gregor Best wrote: > At Thu, 12 Mar 2009 20:13:30 +0100 > Gregor Best wrote: > > > Take it, hold it, love it :) > > > > This version should be even more usable. >
And once again, a little improvement :)
--
GCS/IT/M d- s+:- a--- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o--
K- w--- O M-- V PS+ PE- Y+ PGP+++ t+ 5 X+ R tv+ b++ DI+++ D+++ G+
e- h! r y+
Gregor Best
From 5a4e7ffa04b48cf41bde90974a3772059e47e748 Mon Sep 17 00:00:00 2001 From: Gregor Best <[email protected]> Date: Thu, 12 Mar 2009 20:11:52 +0100 Subject: [PATCH] lib/awful/client: store floating geometry of clients in awful Signed-off-by: Gregor Best <[email protected]> --- lib/awful/client.lua.in | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in index 36d992d..8f0c4d9 100644 --- a/lib/awful/client.lua.in +++ b/lib/awful/client.lua.in @@ -551,11 +551,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 s = c.screen + if s == true then + c:geometry(property.get(c, "floating_geometry")) + end + c.screen = s 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) -- 1.6.2
signature.asc
Description: PGP signature
