+2008-06-27 Ivan N. Zlatev <contact@i-nz.net>
+
+ * XplatUIX11.cs, InternalWindowManager.cs:
+ If WS_EX_TOOLWINDOW is set in the CreateParams for a form MS
+ doesn't automagically update the FormBorderStyle, so we must
+ double check the CreateParams explicitly to determine if the
+ window is a toolwindow.
+ * ThemeWin32Classic.cs: Use InternalWindowManager.IsToolWindow
+ instead of doing custom checks.
+
+ Fixes toolwindows for the test case in bug #402446
+
2008-06-27 Ivan N. Zlatev <contact@i-nz.net>
* Control.cs: Visibility of the control should be false
when the handle is destroyed in WmDestroy and not immediately
- in Dispose().
+ in Dispose(). This is effectively where the disposing process
+ ends even though the control is marked as Disposed immediately
+ after calling Dispose().
[Fixes bug #402446]
2008-06-27 Ivan N. Zlatev <contact@i-nz.net>
public bool IsToolWindow {
get {
if (form.FormBorderStyle == FormBorderStyle.SizableToolWindow ||
- form.FormBorderStyle == FormBorderStyle.FixedToolWindow)
+ form.FormBorderStyle == FormBorderStyle.FixedToolWindow ||
+ form.GetCreateParams().IsSet (WindowExStyles.WS_EX_TOOLWINDOW))
return true;
return false;
}
internal override void SetBorderStyle(IntPtr handle, FormBorderStyle border_style) {
Form form = Control.FromHandle (handle) as Form;
- if (form != null && form.window_manager == null && (border_style == FormBorderStyle.FixedToolWindow ||
- border_style == FormBorderStyle.SizableToolWindow)) {
- form.window_manager = new ToolWindowManager (form);
+ if (form != null && form.window_manager == null) {
+ CreateParams cp = form.GetCreateParams ();
+ if (border_style == FormBorderStyle.FixedToolWindow ||
+ border_style == FormBorderStyle.SizableToolWindow ||
+ cp.IsSet (WindowExStyles.WS_EX_TOOLWINDOW)) {
+ form.window_manager = new ToolWindowManager (form);
+ }
}
RequestNCRecalc(handle);