[Lazarus] Cursor issue in Editor compiled with GTK2

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Aug 19 12:06:52 CEST 2008


On Tue, Aug 19, 2008 at 9:44 AM, Mattias Gärtner
<nc-gaertnma at netcologne.de> wrote:
> The cursor is painted by the gtk2 interface during OnPaint events. When the
> cursor is moved, hidden or shown the gtk2 interface automatically does an
> InvalidateRect. That means simply moving around works.

See attached screenshot. The actual cursor is at the location of the
magenta line (painted in with Gimp). My real cursor color is yellow,
so all the other yellow lines you see are artifacts left behind (NOT
painted in with Gimp).

That was caused by using the up/down arrow key to change the cursor
position.  Using left/right arrow keys or the mouse click on the same
line works 100%.  Clicking with the mouse to adjust cursor position,
also causes this problem.  Obviously I need to catch the cursor in the
active (visible) state when I change it's position, which then leaves
behind those artifacts.

> The only problem - as far as I have seen - are external invalidates (not from
> the LCL). For example switching from other applications or popup windows.
> Does your caret hide when you switch to another window?

It stops blinking, but again, if I changed window focus at the time
that the cursor was painted active (yellow in my case), it stays
visible.


Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot.gif
Type: image/gif
Size: 8837 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20080819/d9369612/attachment-0007.gif>


More information about the Lazarus mailing list