[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnetlib ChangeLog Xsharp/XsharpSupport.c Xsharp...
From: |
Heiko Weiss |
Subject: |
[dotgnu-pnet-commits] pnetlib ChangeLog Xsharp/XsharpSupport.c Xsharp... |
Date: |
Thu, 23 Nov 2006 11:05:35 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: pnetlib
Changes by: Heiko Weiss <brubbel> 06/11/23 11:05:35
Modified files:
. : ChangeLog
Xsharp : XsharpSupport.c InputOutputWidget.cs
System.Windows.Forms: TextBox.cs
System/Net/Sockets: Socket.cs
Log message:
XsharpSupport.c: fixed hanging app in XNextEventWithTimeout.
InputOutputWidget.cs: fixed Expose if widget was detroyed.
TextBox.cs: fixed SetTextActual.
Socket.cs: enabled other socket types.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnetlib/ChangeLog?cvsroot=dotgnu-pnet&r1=1.2458&r2=1.2459
http://cvs.savannah.gnu.org/viewcvs/pnetlib/Xsharp/XsharpSupport.c?cvsroot=dotgnu-pnet&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/pnetlib/Xsharp/InputOutputWidget.cs?cvsroot=dotgnu-pnet&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pnetlib/System.Windows.Forms/TextBox.cs?cvsroot=dotgnu-pnet&r1=1.56&r2=1.57
http://cvs.savannah.gnu.org/viewcvs/pnetlib/System/Net/Sockets/Socket.cs?cvsroot=dotgnu-pnet&r1=1.23&r2=1.24
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/ChangeLog,v
retrieving revision 1.2458
retrieving revision 1.2459
diff -u -b -r1.2458 -r1.2459
--- ChangeLog 15 Nov 2006 08:45:12 -0000 1.2458
+++ ChangeLog 23 Nov 2006 11:05:34 -0000 1.2459
@@ -1,3 +1,10 @@
+2006-11-23 Heiko Weiss <address@hidden>
+
+ * Xsharp/XsharpSupport.c: fixed hanging app in XNextEventWithTimeout.
+ * Xsharp/InputOutputWidget.cs: fixed Expose if widget was detroyed.
+ * System.Windows.Forms/TextBox.cs: fixed SetTextActual.
+ * System/Net/Sockets/Socket.cs: enabled other socket types.
+
2006-11-15 Heiko Weiss <address@hidden>
* System.Windows.Forms/TextBox.cs: fixed index out of range exception.
Index: Xsharp/XsharpSupport.c
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/Xsharp/XsharpSupport.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- Xsharp/XsharpSupport.c 9 Sep 2005 13:04:17 -0000 1.33
+++ Xsharp/XsharpSupport.c 23 Nov 2006 11:05:35 -0000 1.34
@@ -55,8 +55,14 @@
/* If there was activity on the connection, then read the event */
if(result > 0)
{
+ if( XPending( dpy ) <= 0 ) {
+ // printf( "??? XPending<=0 ???" );
+ result = 0; // no event is here to process, even select
told that there should be an event
+ }
+ else {
XNextEvent(dpy, event);
}
+ }
/* Return the final result to the caller */
return result;
Index: Xsharp/InputOutputWidget.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/Xsharp/InputOutputWidget.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- Xsharp/InputOutputWidget.cs 26 Oct 2006 16:08:09 -0000 1.13
+++ Xsharp/InputOutputWidget.cs 23 Nov 2006 11:05:35 -0000 1.14
@@ -684,6 +684,7 @@
// sometimes it could be that Expose is
called but the handle is destroyed.
// so check here, if handle not null.
if( handle != XDrawable.Zero ) {
+ try {
Graphics graphics = new
Graphics(this);
graphics.exposeRegion = region;
graphics.SetClipRegion(region);
@@ -691,6 +692,9 @@
graphics.Dispose();
region.Dispose();
}
+ catch(
XInvalidOperationException ) { // irgnore Widget disposed exception
+ }
+ }
}
}
Index: System.Windows.Forms/TextBox.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/System.Windows.Forms/TextBox.cs,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- System.Windows.Forms/TextBox.cs 15 Nov 2006 08:45:13 -0000 1.56
+++ System.Windows.Forms/TextBox.cs 23 Nov 2006 11:05:35 -0000 1.57
@@ -1125,6 +1125,7 @@
SetScrollBarPositions();
if (prevLayout)
{
+ try {
Region update = new Region(RectangleF.Empty);
int oldLen = oldText.Length;
int newLen = text.Length;
@@ -1138,30 +1139,29 @@
{
if (i >= oldLen)
{
- if( i < newLen && i <
layout.Items.Length ) update.Union( layout.Items[i].bounds);
+ if( i < newLen ) update.Union(
layout.Items[i].bounds);
}
else if (i >= newLen )
{
- if( i < oldLen && i <
oldLayout.Items.Length ) update.Union( oldLayout.Items[i].bounds);
+ if( i < oldLen ) update.Union(
oldLayout.Items[i].bounds);
}
else if ( (i < oldLen && i < newLen) &&
(Text[i] != oldText[i] || oldLayout.Items[i].bounds != layout.Items[i].bounds )
)
{
if( i < newLen ) {
- if( i < layout.Items.Length ) {
update.Union(
layout.Items[i].bounds);
}
- }
if( i < oldLen ) {
- if( i < oldLayout.Items.Length
) {
update.Union(
oldLayout.Items[i].bounds);
}
}
}
- }
// Get the offset of the TextDrawArea
update.Translate( - XViewOffset, - YViewOffset);
AddUpdate(update);
}
+ catch { // ignore exceptions here, because in some
cases this could happen
+ }
+ }
}
// Get the length of the selection.
Index: System/Net/Sockets/Socket.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/System/Net/Sockets/Socket.cs,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- System/Net/Sockets/Socket.cs 25 Feb 2005 19:14:58 -0000 1.23
+++ System/Net/Sockets/Socket.cs 23 Nov 2006 11:05:35 -0000 1.24
@@ -58,8 +58,10 @@
{
throw new SocketException(Errno.EINVAL);
}
- if(socketType == SocketType.Stream)
- {
+
+ switch( socketType ) {
+
+ case SocketType.Stream :
if(protocolType ==
ProtocolType.Unspecified)
{
if(addressFamily ==
AddressFamily.InterNetwork ||
@@ -72,9 +74,9 @@
{
throw new
SocketException(Errno.EPROTONOSUPPORT);
}
- }
- else if(socketType == SocketType.Dgram)
- {
+ break;
+
+ case SocketType.Dgram :
if(protocolType ==
ProtocolType.Unspecified)
{
if(addressFamily ==
AddressFamily.InterNetwork ||
@@ -87,10 +89,25 @@
{
throw new
SocketException(Errno.EPROTONOSUPPORT);
}
- }
- else
+ break;
+
+ case SocketType.Raw:
+ if(protocolType ==
ProtocolType.Unspecified)
{
- throw new
SocketException(Errno.ESOCKTNOSUPPORT);
+ if(addressFamily ==
AddressFamily.InterNetwork ||
+
addressFamily == AddressFamily.InterNetworkV6)
+ {
+ protocolType =
ProtocolType.Raw;
+ }
+ }
+ break;
+
+ case SocketType.Rdm : case
SocketType.Seqpacket :
+ break;
+
+ default:
+ throw new
SocketException(Errno.EPROTONOSUPPORT);
+ break;
}
// Initialize the local state.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnetlib ChangeLog Xsharp/XsharpSupport.c Xsharp...,
Heiko Weiss <=