wibar: Restore previous behavior

The behavior was changed during the rewrite. This was a mistake
as it was assumed (wrongly) that nobody used this function with
wiboxes other than "wibars" (awful.wibox).

Fixes #917
This commit is contained in:
Emmanuel Lepage Vallee 2016-05-19 00:49:44 -04:00
parent 40d1d5c9c7
commit dbcb850de9
1 changed files with 8 additions and 3 deletions

View File

@ -205,11 +205,14 @@ function awfulwibar.set_position(wb, position, screen) --luacheck: no unused arg
end
--- Attach a wibox to a screen.
-- If a wibox is attached, it will be automatically be moved when other wiboxes
-- will be attached.
--
-- This function has been moved to the `awful.placement` module. Calling this
-- no longer does anything.
--
-- @param wb The wibox to attach.
-- @param position The position of the wibox: top, bottom, left or right.
-- @param screen The screen to attach to
-- @see awful.placement
-- @deprecated awful.wibar.attach
function awfulwibar.attach(wb, position, screen) --luacheck: no unused args
util.deprecate("awful.wibar.attach is deprecated, use the 'attach' property"..
@ -249,7 +252,9 @@ function awfulwibar.align(wb, align, screen) --luacheck: no unused args
util.deprecate("awful.wibar.align 'screen' argument is deprecated")
end
attach(wb, align)
if placement[align] then
return placement[align](wb)
end
end
--- Stretch a wibox so it takes all screen width or height.