dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] Patch for double buffering problem


From: Marc Haisenko
Subject: [Pnet-developers] Patch for double buffering problem
Date: Thu, 8 Sep 2005 17:28:17 +0200
User-agent: KMail/1.8.1

Attached is a patch to fix bug #13966 (Clipping with double buffer not works). 
I'm not 100% happy with it but think it's the correct way nevertheless but 
would like to get some feedback before I commit it.

A little explanation:

The problem is that if an Invalidate(Rectangle rect) is done then OnPaint is 
called with a Graphics that has ClipBounds set to rect. Works fine under X 
Window with no double buffering, but if you enable it then the whole control 
is messed up. Only what you've really drawn is updated.

Peter Flaig has attached a small test application that demonstrates this bug. 
If you start the application, pay attention to the small ping bar at the top 
of the colored area. It shouldn't change. Without my patch it vanishes when 
"Double buffer" is checked.

It looks like my patch has no side effects but this an area that is very hard 
to debug so I want to get feedback from someone else. On a sidenote, I wonder 
whether this bug is present on Win32 as well... I guess so.

My patch changes an internal interface: 
System.Drawing.Toolkit.IToolkitWindowBuffer.BeginDoubleBuffer now has a 
rectangle as argument, because this is the vital information that wasn't 
passed (and thus wasn't processed).

If I don't hear any complaints (side effects, wrong approach, whatever) I'll 
commit it on Monday.

C'ya,
        Marc
-- 
Marc Haisenko
http://darkdust.net
Today is Sweetmorn, the 32nd day of Bureaucracy in the YOLD 3171

Attachment: doublebuffer2.patch
Description: Text Data

Attachment: pgpu9hATkfixO.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]