[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms TextBox.cs, 1.2,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms TextBox.cs, 1.2, 1.3 |
Date: |
Thu, 24 Jul 2003 23:04:39 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms
In directory subversions:/tmp/cvs-serv6116/System.Windows.Forms
Modified Files:
TextBox.cs
Log Message:
Make sure that the graphics objects returned by "CreateGraphics" are
properly disposed of, because letting the finalizer do it causes
dead-locks under Xsharp.
Index: TextBox.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/TextBox.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** TextBox.cs 24 Jul 2003 17:49:11 -0000 1.2
--- TextBox.cs 25 Jul 2003 03:04:37 -0000 1.3
***************
*** 190,194 ****
string oldText = base.Text;
base.Text = text;
! LayoutFromText(CreateGraphics());
if (prevLayout)
{
--- 190,197 ----
string oldText = base.Text;
base.Text = text;
! using (Graphics g = CreateGraphics())
! {
! LayoutFromText(g);
! }
if (prevLayout)
{
***************
*** 492,500 ****
Region invalidRegion = newRegion.Clone();
invalidRegion.Xor(selectedRegion);
! RectangleF b1 = invalidRegion.GetBounds(
CreateGraphics());
Invalidate(invalidRegion);
}
selectedRegion = newRegion;
! RectangleF b = selectedRegion.GetBounds( CreateGraphics());
}
--- 495,509 ----
Region invalidRegion = newRegion.Clone();
invalidRegion.Xor(selectedRegion);
! using (Graphics g = CreateGraphics())
! {
! invalidRegion.GetBounds(g);
! }
Invalidate(invalidRegion);
}
selectedRegion = newRegion;
! using (Graphics g = CreateGraphics())
! {
! selectedRegion.GetBounds(g);
! }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms TextBox.cs, 1.2, 1.3,
Rhys Weatherley <address@hidden> <=