Author: toshok
Date: 2006-11-27 23:49:32 -0500 (Mon, 27 Nov 2006)
New Revision: 68559
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs
Log:
2006-11-27 Chris Toshok <[EMAIL PROTECTED]>
* Hwnd.cs: only add the hwnd to the windows hash in
set_WholeWindow and set_ClientWindow if whole_window/client_window
are not IntPtr.Zero. also, remove the unused SetObjectWindow.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-28 04:46:40 UTC (rev 68558)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-28 04:49:32 UTC (rev 68559)
@@ -1,3 +1,9 @@
+2006-11-27 Chris Toshok <[EMAIL PROTECTED]>
+
+ * Hwnd.cs: only add the hwnd to the windows hash in
+ set_WholeWindow and set_ClientWindow if whole_window/client_window
+ are not IntPtr.Zero. also, remove the unused SetObjectWindow.
+
2006-11-27 Mike Kestner <[EMAIL PROTECTED]>
* ComboBox.cs: remove redundant OnDropDown call. It is called
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs
2006-11-28 04:46:40 UTC (rev 68558)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs
2006-11-28 04:49:32 UTC (rev 68559)
@@ -126,10 +126,6 @@
#endregion
#region Static Methods
- public void SetObjectWindow(Hwnd obj, IntPtr window) {
- windows[window] = obj;
- }
-
public static Hwnd ObjectFromWindow(IntPtr window) {
Hwnd rv;
lock (windows) {
@@ -275,9 +271,11 @@
zombie = false;
- lock (windows) {
- if (windows[client_window] == null) {
- windows[client_window] = this;
+ if (client_window != IntPtr.Zero) {
+ lock (windows) {
+ if (windows[client_window] ==
null) {
+ windows[client_window]
= this;
+ }
}
}
}
@@ -519,9 +517,11 @@
zombie = false;
- lock (windows) {
- if (windows[whole_window] == null) {
- windows[whole_window] = this;
+ if (whole_window != IntPtr.Zero) {
+ lock (windows) {
+ if (windows[whole_window] ==
null) {
+ windows[whole_window] =
this;
+ }
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches