* Form.cs (set_TransparencyKey): only call SetWindowTransparency
authorChris Toshok <toshok@novell.com>
Thu, 30 Nov 2006 02:14:54 +0000 (02:14 -0000)
committerChris Toshok <toshok@novell.com>
Thu, 30 Nov 2006 02:14:54 +0000 (02:14 -0000)
if it's supported.
(set_AllowTransparency): reorder things a little so that the
WS_EX_LAYERED style is removed properly.

2006-11-29  Chris Toshok  <toshok@ximian.com>

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

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

index 1a3db1b4a1501245b349df39a5a13442a921a822..cdfa524b423acdea6a9e786d0132b294fc1e62af 100644 (file)
@@ -1,3 +1,10 @@
+2006-11-29  Chris Toshok  <toshok@ximian.com>
+
+       * Form.cs (set_TransparencyKey): only call SetWindowTransparency
+       if it's supported.
+       (set_AllowTransparency): reorder things a little so that the
+       WS_EX_LAYERED style is removed properly.
+
 2006-11-29  Chris Toshok  <toshok@ximian.com>
 
        [ totally cosmetic eye-candy feature, fixes bug #80089 ]
index ff9b676d72904e9f0f9160f31b4114697fb1d575..fd460cf154dd7a85b09b4570fdade0d62d2ec2c7 100644 (file)
@@ -237,11 +237,11 @@ namespace System.Windows.Forms {
                                        return;
                                }
 
-                               if ((XplatUI.SupportsTransparency() & TransparencySupport.Set) != 0) {
-                                       allow_transparency = value;
+                               allow_transparency = value;
 
-                                       if (value) {
-                                               if (IsHandleCreated) {
+                               if (value) {
+                                       if (IsHandleCreated) {
+                                               if ((XplatUI.SupportsTransparency() & TransparencySupport.Set) != 0) {
                                                        XplatUI.SetWindowTransparency(Handle, Opacity, TransparencyKey);
                                                }
                                        } else {
@@ -925,7 +925,8 @@ namespace System.Windows.Forms {
 
                                AllowTransparency = true;
                                UpdateStyles();
-                               XplatUI.SetWindowTransparency(Handle, Opacity, transparency_key);
+                               if ((XplatUI.SupportsTransparency () & TransparencySupport.Set) != 0)
+                                       XplatUI.SetWindowTransparency(Handle, Opacity, transparency_key);
                        }
                }