permission: Fix hiding the border for maximized clients.
When the theme variables were moved to the backend instead of `rc.lua`, some magic was added to disable them if the user set the border. However, some undocumented `awful.placement` code also set them and turned off the theme variables. So it worked *once* then stopped working.
This commit is contained in:
parent
907053f31a
commit
146a9c3166
|
@ -631,10 +631,16 @@ function permissions.update_border(c, context)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not c._private._user_border_width then
|
if not c._private._user_border_width then
|
||||||
c._border_width = beautiful["border_width"..suffix]
|
local bw = beautiful["border_width"..suffix]
|
||||||
or beautiful["border_width"..fallback1]
|
or beautiful["border_width"..fallback1]
|
||||||
or beautiful["border_width"..fallback2]
|
or beautiful["border_width"..fallback2]
|
||||||
or beautiful.border_width
|
|
||||||
|
-- The default `awful.permissions.geometry` handler removes the border.
|
||||||
|
if (not bw) and (c.fullscreen or c.maximized) then
|
||||||
|
bw = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
c._border_width = bw or beautiful.border_width
|
||||||
end
|
end
|
||||||
|
|
||||||
if not c._private._user_border_color then
|
if not c._private._user_border_color then
|
||||||
|
|
|
@ -383,7 +383,7 @@ end
|
||||||
area_common = function(d, new_geo, ignore_border_width, args)
|
area_common = function(d, new_geo, ignore_border_width, args)
|
||||||
-- The C side expect no arguments, nil isn't valid
|
-- The C side expect no arguments, nil isn't valid
|
||||||
if new_geo and args.zap_border_width then
|
if new_geo and args.zap_border_width then
|
||||||
d.border_width = 0
|
d._border_width = 0
|
||||||
end
|
end
|
||||||
local geometry = new_geo and d:geometry(new_geo) or d:geometry()
|
local geometry = new_geo and d:geometry(new_geo) or d:geometry()
|
||||||
local border = ignore_border_width and 0 or d.border_width or 0
|
local border = ignore_border_width and 0 or d.border_width or 0
|
||||||
|
@ -1633,7 +1633,7 @@ function placement.restore(d, args)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
d.border_width = memento.border_width
|
d._border_width = memento.border_width
|
||||||
|
|
||||||
-- Don't use the memento as it would be "destructive", since `x`, `y`
|
-- Don't use the memento as it would be "destructive", since `x`, `y`
|
||||||
-- and `screen` have to be modified.
|
-- and `screen` have to be modified.
|
||||||
|
|
Loading…
Reference in New Issue