Author: rolf
Date: 2007-07-13 05:16:14 -0400 (Fri, 13 Jul 2007)
New Revision: 81932
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
Log:
* Form.cs: Make the fix for #80775 windows-only (fixes #81957).
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-07-13 09:06:35 UTC (rev 81931)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-07-13 09:16:14 UTC (rev 81932)
@@ -1,3 +1,7 @@
+2007-07-13 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * Form.cs: Make the fix for #80775 windows-only (fixes #81957).
+
2007-07-12 Jonathan Pobst <[EMAIL PROTECTED]>
* SystemInformation.cs, Theme.cs, XplatUI.cs, XplatUIDriver.cs,
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
2007-07-13 09:06:35 UTC (rev 81931)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
2007-07-13 09:16:14 UTC (rev 81932)
@@ -1417,6 +1417,7 @@
cp.ExStyle |=
(int)WindowExStyles.WS_EX_CONTEXTHELP;
}
+ // bug 80775:
//don't set WS_VISIBLE if we're changing
visibility. We can't create forms visible,
//since we have to set the owner before making
the form visible
//(otherwise Win32 will do strange things with
task bar icons).
@@ -1424,7 +1425,12 @@
//so is_changing_visible_state is the only way
of determining if we're
//in the process of creating the form due to
setting Visible=true.
//This works because SetVisibleCore explicitly
makes the form visibile afterwards anyways.
- if ((VisibleInternal &&
is_changing_visible_state == 0) || this.IsRecreating)
+ // bug 81957:
+ //only do this when on Windows, since X behaves
weirdly otherwise
+ //modal windows appear below their
parent/owner/ancestor.
+ //(confirmed on several window managers, so
it's not a wm bug).
+ bool is_unix = ((int)
Environment.OSVersion.Platform) == 128 || ((int) Environment.OSVersion.Platform
== 4);
+ if ((VisibleInternal &&
(is_changing_visible_state == 0 || is_unix)) || this.IsRecreating)
cp.Style |=
(int)WindowStyles.WS_VISIBLE;
if (opacity < 1.0 || TransparencyKey !=
Color.Empty) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches