[Lazarus] GTK2 paint event
joshyfun at gmail.com
Wed Dec 8 18:32:39 CET 2010
Working in the gecko port in GTK2 I had discovered something that
looks like a bug, but maybe not.
The gecko browser is using a GTK Window which is a TCustomControl,
once put in the form and started it does nothing unless the mouse is
moved over the form (not need to move over the control), so it looks
like a non processed message. After some tests I had decided to add a
timer to the form and in the event handler add
"Application.ProcessMessages" and now the window is rendered as
So for me it looks like the message filter in GTK2 is not being fired
with external paints.
Now a second problem with maybe same roots, once the control is
painted thanks to the Application.ProcessMessages every 100 ms if I
resize the window the control receives the paint message but the
painted content is not displayed unless I manually raise some kind of
form change like a caption change, so now my Paint handler looks like:
GeckoWindow.Paint(true); //force paint
Self.Parent.Caption:=floattostr(now); //forces a form caption change
This behavior does not look fine to me, but maybe anybody have a
different opinion. I'm using yesterday SVN of both fpc and Lazarus in
Ubuntu running in a VirtualBox VM.
If anybody have a suspect about the problem source I'll try any change
that anybody suggest. Thank you.
More information about the Lazarus