On Jul 15, 2012 10:58 AM, "Uri Goren" <[email protected]> wrote: > > Hi, > I built a simple GUI which, after the user presses "OK", runs some commands and > exits. > When I use the keyboard, everything is fine. > When I use the mouse, after my program exits, I see three characters > in my command prompt, as if I have typed them.
That's the mouse release event being sent by your terminal, but urwid has already exited so your shell is echoing it back. One fix would be to activate buttons on mouse release instead of press. That's tricky though because release events usually don't include which button was released, and how should a click outside a button with a release inside the (or vice versa) be handled? Another option might be to wait briefly before exiting when the button is clicked with MainLoop.set_alarm_in but that's not perfect either. Ian
_______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
