Re: Cursor movement


Subject: Re: Cursor movement
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Fri Jul 07 2000 - 19:19:37 CDT


Hi Ed,
        These are all Abiword bugs. I've done an extensive amount of
cursor dirt fixing that was included in the Lists patch. Can you do cvs
update and see if the bug is fixed?

The cursor is an XOR line on the Abi canvas. It is impossible apriori to
know whether a cursor has been drawn or erased from stuff read from
the screen. Instead we keep track of whether the cursor is currently drawn
or not with some private member variables in fv_View. In general cursor
dirt arises when the the cursor is drawn ("on") and some drawing on the
canvas takes place. For example if the cursor is set to blink, is on and
the canvas is cleared over the region where the was on, the the next blink
will cause the cursor to come "on" again where the private member variable
says it should be off. So the blink code is out of phase with private
variable. Now when we move the cursor, the erase code looks
to see if the cursor is on by looking up the private member variable and
if it is it erases the cursor. Needless to say if the value of the member
variable is wrong the erase code gets it wrong to and cursor dirt is left
behind. The process of eliminating cursor dirt is a laborious search
through the code to look for instances where drawing code is called before
erasing the cursor.

Look at eraseInsertionPoint() and drawInsertionPoint() in fv_View and the
surrounding code for the cursor logic. In the code I just committed I put
an asert before every screen access in fp_Run and fp_TestRun to look to
see if the cursor was on before the screen access. I then used gdb to
trace back to the highest level at which an eraseInsertionPoint() should
be placed.

If there is still cursor dirt feel free to track it down!

Cheers

Martin

 On Fri, 7 Jul 2000, Big Ed wrote:

> I've found a few redraw bugs including a selection bug (#935 in bugzilla)
> where when selecting with Shift-UpArrow and Shift-DownArrow leave a line
> where the cursor was. Causing the screen to be redrawn fixes this, but I'm
> trying to find where the cursor-blink and movement code is located. I'm not
> sure if this is a GDK/GTK problem or if it's an abiword issue. Either way,
> I figured asking you guys would be the quicker way of tracking down where
> the code resides.
>
> Thanks
> Ed
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
>



This archive was generated by hypermail 2b25 : Fri Jul 07 2000 - 19:19:53 CDT