On Sun, May 08, 2005 at 05:50:08PM +0100, John Levon wrote: > On Sun, May 08, 2005 at 03:50:56PM +0100, Angus Leeming wrote: > > > sync_events appears to be called on each and every blink of the cursor: > > void LyXScreen::showCursor(BufferView & bv) > > { > > // You are not expected to understand this. This forces Qt > > // (the problem case) to deal with its event queue. This is > > // necessary when holding down a key such as 'page down' or > > // just typing: without this processing of the event queue, > > // the cursor gets ahead of itself without a selection or > > // workarea redraw having a chance to keep up. If you think > > // you can remove this, try selecting text with the mouse > > // in Qt, or holding Page Down on the User's Guide. > > lyx_gui::sync_events(); > > People have tried to take this out before, hence the comment. I can > almost guarantee it will break if you try to remove it. Sorry, I don't > know of a good solution either. > > But I'm a bit confused as to why this is an issue: when I rewrote the > cursor handling, I'm pretty sure I made it so that showCursor is only > /ever/ called right at the end of an update (that is, after processing > an LFUN). So I don't see why this is nesting, unless somebody has > changed this behaviour.
You mean the hideCursor/showCursor mechanism in redraw()? But... isn't this cursor drawing and hiding an asynchronous process taking place every 400 msec? What happens if a drawing activity takes longer than 400 (800?) msec and the cursor comes back all of itself in the middle of it? Only Qt has a working sync_events right now... - Martin
pgpFWn18NaV7c.pgp
Description: PGP signature