Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-08

Cursor issue in Editor compiled with GTK2

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Is the cursor painting (not clearing/repainting it's previous position) a known issue? I tried Lazarus compiled with GTK2 yesterday. Pressing the up/down arrow navigating the code, I end up with what looks like 10-15 cursors. Actually only one is the cursor, the others are leftover positions not being cleaned up with a repaint.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner 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://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080819/d9369612/attachment-0001.gif

Reply by email