From 608f3eb7cfbedeea07b081627639e101c27a73af Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Fri, 1 Apr 2016 01:29:06 -0400 Subject: [PATCH] awful.client: Add an is_fixed property --- lib/awful/client.lua | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/awful/client.lua b/lib/awful/client.lua index fbff5aa0..f9e71200 100644 --- a/lib/awful/client.lua +++ b/lib/awful/client.lua @@ -539,10 +539,31 @@ end) capi.client.connect_signal("property::geometry", store_floating_geometry) ---- Return if a client has a fixe size or not. +--- Return if a client has a fixed size or not. +-- This function is deprecated, use `c.is_fixed` -- @client c The client. +-- @deprecated awful.client.isfixed +-- @see is_fixed +-- @see size_hints_honor function client.isfixed(c) + util.deprecate "Use c.is_fixed instead of awful.client.isfixed" c = c or capi.client.focus + return client.object.is_fixed(c) +end + +--- Return if a client has a fixed size or not. +-- +-- **Signal:** +-- +-- * *property::is_fixed* +-- +-- This property is read only. +-- @property is_fixed +-- @param boolean The floating state +-- @see size_hints +-- @see size_hints_honor + +function client.object.is_fixed(c) if not c then return end local h = c.size_hints if h.min_width and h.max_width @@ -593,7 +614,7 @@ function client.object.get_floating(c) or c.fullscreen or c.maximized_vertical or c.maximized_horizontal - or client.isfixed(c) then + or client.object.is_fixed(c) then return true end return false