2010-04-19 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 19 Apr 2010 09:27:55 +0000 (09:27 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Mon, 19 Apr 2010 09:27:55 +0000 (09:27 -0000)
* XplatUIX11.cs: When adding a NotifyIcon to the system tray, mark its
Hwnd.mapped as true, since its handle is going to be mapped later by
the tray (not us), but we need to know it's alive and can later properly unmap
it.
Fixes part of #590093.

svn path=/trunk/mcs/; revision=155705

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs

index b26f41059da49b311b8a79a4edc7322235523e57..3d090eaaf8250d41ea5cf34fdfc630f9ac855a92 100644 (file)
@@ -1,3 +1,11 @@
+2010-04-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * XplatUIX11.cs: When adding a NotifyIcon to the system tray, mark its
+       Hwnd.mapped as true, since its handle is going to be mapped later by
+       the tray (not us), but we need to know it's alive and can later properly unmap
+       it.
+       Fixes part of #590093.
+
 2010-04-16  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * TreeNodeCollection.cs: When adding/inserting/setting a new node call
index 6b7645f56b8d9199d2d6e2b4a8bf57db250e5675..9db4387077134faf9a6b4faa7d073499b9533ec0 100644 (file)
@@ -6017,6 +6017,10 @@ namespace System.Windows.Forms {
                                                hwnd.Queue.Paint.Remove (hwnd);
                                }
 
+                               // We are going to be directly mapped by the system tray, so mark as mapped
+                               // so we can later properly unmap it.
+                               hwnd.mapped = true;
+
                                size_hints = new XSizeHints();
 
                                size_hints.flags = (IntPtr)(XSizeHintsFlags.PMinSize | XSizeHintsFlags.PMaxSize | XSizeHintsFlags.PBaseSize);