From dbcb850de94067526e1278c0b95dbe2ec81784ed Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 19 May 2016 00:49:44 -0400 Subject: [PATCH] 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 --- lib/awful/wibar.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/awful/wibar.lua b/lib/awful/wibar.lua index 06bc7b10..af095030 100644 --- a/lib/awful/wibar.lua +++ b/lib/awful/wibar.lua @@ -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.