mouse clicks in console window delayed

L

ludwig.frank

Hi,

I am attempting to detect mouse clicks from within curses, using
"select" on sys.stdin. It is working great within an xterm under X, but
not very well in a "real" linux console. When I click my mouse while on
the "real" console, nothing happens at first, even on repeated clicks.
Once I press a keyboard key, I see a "409" in my trace, indicating the
mouse event. The next keystroke will bring up the two keyboard events.
The additional mouse clicks (all but the first or all but the last, I
don't know) are lost.

I am wondering if someone could tell me why this is happening, and more
importantly, what to do about it (short of changing the entire
detection loop to busy polling. I noticed I am not the first with this
problem but I haven't yet found a solution posted.

Additional observations: Happens with the last gpm, regardless whether
compiled --without-curses or not. I do see my mouse events happen
instantly watching the output of gpm's "mev". Interestingly, I see the
mouse clicks almost immediately when I code a busy loop around
screen.getch().

System info: Python 2.5, OpenSuse 10.1, gpm 1.20.1, tried several
terminal types without seeing a difference.

Thanks in advance,
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top