Hello,

I am working on menu.lua to extend capabilities :
  - add an open_submenu key
  - add auto_expand mode with keyboard usage.

Reading the code I found a little bug : a useless loop.
I make a simple patch to remove the loop. Perhaps it's not the good
solution because I am not sure if we need to clean some object..



Vincent
From 5f3102dbffbcc21ebf8be4c0156433ad545736e8 Mon Sep 17 00:00:00 2001
From: Vincent Mauge <[email protected]>
Date: Wed, 6 May 2009 23:46:39 +0200
Subject: [PATCH] Remove useless loop in hide()

---
 lib/awful/menu.lua.in |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in
index c7402e9..24f98bb 100644
--- a/lib/awful/menu.lua.in
+++ b/lib/awful/menu.lua.in
@@ -65,10 +65,7 @@ end
 function hide(menu)
     -- Remove items from screen
     for i = 1, #menu.items do
-        -- Call mouse_leave to clear menu entry
-        for k, w in pairs(menu.items[i].wibox.widgets) do
-            item_leave(menu, i)
-        end
+        item_leave(menu, i)
         menu.items[i].wibox.screen = nil
     end
     if menu.active_child then
-- 
1.6.0.4

Reply via email to