[lazarus] GTK team: please specify!

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Nov 8 17:51:50 EST 2003


On Wed, 05 Nov 2003 00:37:42 +0100
Marc Weustink <marc at dommelstein.net> wrote:

> At 22:29 4-11-2003, Mattias Gaertner wrote:
> >On Tue, 04 Nov 2003 22:12:26 +0100
> >Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> >
> > > Mattias Gaertner wrote:
> > > > On Tue, 04 Nov 2003 14:24:31 +0100
> > > > Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> > > >
> > > >
> > > >>I have implemented GetDesignerDC for win32. Screen relative
> > > >positions.>Works reasonably well. I can see the grid alignment lines
> > > >now :).
> > > >
> > > >
> > > > Grid alignment lines? :)
> > > > I guess, you mean the blue and green guide lines.
> > >
> > > Yes, those :).
> > >
> > > >>But:
> > > >>things drawn onto controls are left behind. I assume nothing is
> > > >drawn>into controls DC's anymore, only to the designer DC?
> > > >
> > > >
> > > > Markers and grids are painted per control paint messages.
> > > > The invalidate rectangles are not big enough. Not a big thing. This
> > > > is a known issue. Although with the new technique it appears more
> > > > often.
> > >
> > > A lot more :). For example: placing a TGroupBox into the form and then
> > > placing a button in that groupbox, selecting it. Then move the button:
> > > a trail of complete square boxes of markers is left behind. Not a
> > > 1-pixel line, but the full 10 by 10 pixel box or so. All blue and
> > > green lines are left behind on controls, so moving them around a
> > > little bit and they all have blue and green borders :). Do you know
> > > the cause, solution?
> >
> >Sounds as if the InvalidateRect does not work properly under win32. Or
> >too good.
> 
> I've been testing all controls and I see this behaviour in Linux/Gtk also 
> on some controls. When moving a component (TTimer) over a control:
> TEdit, then bottom and right border keep trails of the grabbers
> TMemo, when moving over a TMemo, the topleft grabbers and border of the 
> component are left behind.

This is a gtk bug. InvalidateRect uses gtk_widget_queue_draw_area. The gtk
does not adjust the rectangle for the child gdkwindows. Many child windows
have a small offset. I have added 3 Pixel extra invalidate for the design
items, so that they now seem to work.


> TListBox, you can draw whith the component :-) The complete image of the 
> component is left behind.
> 
> Another thing I noticed is that you cant place anything in front of a 
> TCalendar, also no components

It seems these two widgets use some tricks.


Mattias






More information about the Lazarus mailing list