Thanks for the reply, Is there any way on GTK1 of preventing the background fill? My app will redraw the entire client from a bitmap and not need the background fill first.
On Thursday 15 June 2006 10:54 am, Mattias Gaertner wrote: > On Thu, 15 Jun 2006 09:31:48 +0100 > > Paul Michell <[EMAIL PROTECTED]> wrote: > > I am having problems finding a way on Linux to stop a form flickering as > > it is repainted when resized. On Delphi I used to do this by processing > > the Windows Erase Background message and supressing the OS background > > fill (WM.Result=0). When I converted this to the Equivalent LM message it > > didn't work. Googling for a solution I found a suggestion that used the > > DoubleBuffered property to eliminate the flicker. This works under > > windows but not GTK1 on Linux. > > > > My questions are: > > > > Is this a known limitation? > > Yes. gtk1 has no easy double buffering. > > > Will it also be the case in other Linux widgetsets (GTK2/QT)? > > No. gtk2 and qt have double buffering, but someone has to integrate it into > the lcl gtk2/qt interface. > > > Why doesn't the Delphi message handling technique work on Lazarus even in > > Windows? > > - It only works partially. > - It would be harder to maintain the LCL. > - Lazarus prefers platform independent solutions, so platform dependent > tricks are more difficult to achieve than under Delphi. > > > For test purposes you can replicate the problem by creating a single form > > app with the following two event procedures. When the form is resized it > > will flicker red/grey on Linux but be solid red on Windows: > > > > > > Procedure TMainForm.FormCreate(Sender: TObject); > > Begin > > Self.DoubleBuffered := True; > > end; > > > > Procedure TMainForm.FormPaint(Sender: TObject); > > Begin > > Canvas.Brush.Color:=clRed; > > Canvas.FillRect(ClientRect); > > end; > > As DoubleBuffered:=true has no effect on gtk1, it is painting grey, then > red. > > > Mattias > > _________________________________________________________________ > To unsubscribe: mail [EMAIL PROTECTED] with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives