On Tue, Apr 3, 2012 at 11:13 AM, Anurag Priyam <[email protected]> wrote:
[...]
>>> I can fix it.  I need to determine that mouse was clicked outside
>>> menu.  So maybe I can attach a handler to 'press' signal on mouse, but
>>> if it was not clicked on any visible menu (not sure how to determine
>>> that), then close it?

Looks simpler with a signal handler:

button.connect_signal('press', function(but, cl)
  if cl then
    cur_menu:hide()
  else
end)

But there are two issue with it:

1. If I put that code in awful.menu, awesome refuses to start without
any error.  Any idea why?
2. The if block is executed only if the mouse was clicked on a client.
 cl is nil otherwise.

-- 
Anurag Priyam

--
To unsubscribe, send mail to [email protected].

Reply via email to