On 03.04.2012 08:22, Anurag Priyam wrote:
> 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?
Your code works fine here (in Xephyr). No problem with a mouse button getting
stuck. What am I doing wrong? :-/
> Also, how can I pass a normal cursor to mousegrabger? I don't wan't
> the cursor to change -- looks silly.
There is a list of mouse cursors in common/xcursor.c. I guess you want X_cursor,
but that one seems to be broken. Bummer.
> Looks simpler with a signal handler:
>
> button.connect_signal('press', function(but, cl)
> if cl then
> cur_menu:hide()
> else
> end)
What's that "else" doing there?
> 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?
Nope, this works here, too. Something is wrong on my side again.
> 2. The if block is executed only if the mouse was clicked on a client.
> cl is nil otherwise.
The whole signal will only execute for buttons grabbed by the rc.lua. I don't
think that's a good solution.
Sorry, can't say much more right now. (Yes, this is not helpful)
Uli
--
'dubito ergo sum'
-- Elke's whiteboard
--
To unsubscribe, send mail to [email protected].