John Levon wrote:

> On Thu, Nov 20, 2003 at 05:28:38PM +0000, Angus Leeming wrote:
> 
>> John, you know the Qt stuff better than anyone else. Does my
>> proposal seem reasonable to you? To recap:
>> 
>> xforms generates 'pseudo' XEvents in its main interation loop. See
>> below for a refresher ;-)
> 
> You missed out *why* the core needs such fake move events. I
> understand the answer, but I do not know the question. "42" isn't
> good enoough for me :)

The primary example is "select some text with the mouse and, with the 
mouse button still pressed, move the cursor beneath the LyX screen". 

The xforms frontend keeps scrolling (and selecting). No further 
movement of the cursor is required. (This is something copied from 
emacs and, IMO, is an elegant thing to have.)

The qt frontend doesn't do that of course. It needs mouse movement to 
keep the scrolling going. More generally, selecting text with the 
mouse, even with the cursor still in the LyX window, is a right, 
royal pain in the arse.

My proposed solution is two-fold and uses the same timer for both 
parts. This timer is started on MousePress and stopped on 
MouseRelease.
1. Call a QContentPane member function every (say) 200ms. Effectively 
the same idea as the xforms' generation of fake XEvents. This 
function will dispatch a signal to the LyX core and re-start the 
timer.
2. If the timer is running the discard events passed to QContentPane's 
MouseMove slot. This should make 'normal' selection much more 
controllable.

-- 
Angus

Reply via email to