Take it, hold it, love it :)

-- 
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 d22b3b9d2e541a8f349c247d224d28b5bbaf4570 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 |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in
index 36d992d..793a8c7 100644
--- a/lib/awful/client.lua.in
+++ b/lib/awful/client.lua.in
@@ -551,11 +551,19 @@ 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)
+        if s == true then
+            c:geometry(property.get(c, "floating_geometry"))
+            property.set(c, "floating_geometry", c:geometry())
+        end
         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)
+
 --- Return if a client has a fixe size or not.
 -- @param c The client.
 function isfixed(c)
-- 
1.6.2

Attachment: signature.asc
Description: PGP signature

Reply via email to