mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
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
2 changed files with 10 additions and 4 deletions
|
@ -631,10 +631,16 @@ function permissions.update_border(c, context)
|
|||
end
|
||||
|
||||
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"..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
|
||||
|
||||
if not c._private._user_border_color then
|
||||
|
|
|
@ -383,7 +383,7 @@ end
|
|||
area_common = function(d, new_geo, ignore_border_width, args)
|
||||
-- The C side expect no arguments, nil isn't valid
|
||||
if new_geo and args.zap_border_width then
|
||||
d.border_width = 0
|
||||
d._border_width = 0
|
||||
end
|
||||
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
|
||||
|
@ -1633,7 +1633,7 @@ function placement.restore(d, args)
|
|||
|
||||
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`
|
||||
-- and `screen` have to be modified.
|
||||
|
|
Loading…
Reference in a new issue