From fc39db377f4c7dfe860fdf5b9287653713f56cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=96=9F=20=E2=96=96=E2=96=9F=20=E2=96=96?= Date: Sat, 18 Apr 2015 08:57:15 +0200 Subject: [PATCH] awful.menu: resize menu when item count changes When the number of items of a menu change by menu:add or menu:delete and the menu is shown, its wibox has to resize. --- lib/awful/menu.lua.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index df6f59c98..821db869a 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -422,6 +422,9 @@ function menu:add(args, index) table.insert(self.items, item) self.layout:add(item._background) end + if self.wibox then + set_size(self) + end return item end @@ -451,6 +454,9 @@ function menu:delete(num) end table.remove(self.child, num) end + if self.wibox then + set_size(self) + end end --------------------------------------------------------------------------------