From d8dc4bb2f5b600421a87206124fabfd09d265d4f Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 10 Feb 2011 23:03:05 +0100 Subject: [PATCH] awful.client.floating.toggle: Fix for dialogs awful.client.floating.get() does some sensible defaults. E.g. dialogs are floating by default. Since floating.toggle only checked the property, these defaults made it break. So floating.toggle() should use floating.get to decide if a given client is floating. It should also use "false" instead of "nil" when the client is made non-floating or else the default will apply again. Thanks to vsp for making me figure this out. :) Signed-off-by: Uli Schlachter --- lib/awful/client.lua.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in index 2b3a6580a..f369634dc 100644 --- a/lib/awful/client.lua.in +++ b/lib/awful/client.lua.in @@ -627,8 +627,8 @@ end function floating.toggle(c) local c = c or capi.client.focus -- If it has been set to floating - if property.get(c, "floating") then - floating.set(c, nil) + if floating.get(c) then + floating.set(c, false) else floating.set(c, true) end