Author: toshok
Date: 2006-09-26 18:02:38 -0400 (Tue, 26 Sep 2006)
New Revision: 65941

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
        * XplatUIX11.cs (SetWMStyles): turns out when SYSMENU is not set
        and caption == "", we need to remove the resize handles as well as
        the title bar.

        * Control.cs (set_Text): turns out that setting Text on a form
        should change the WM styles on the window, since if ControlBox ==
        false, the only way to get a window border is to have a non-""
        Text property.  check winforms/forms/text.cs for an example.  so,
        call both XplatUI.SetWindowStyle and XplatUI.Text here to properly
        update both window styles and title.  This fixes a lot of dialogs
        (including the preferences dialog in MonoCalendar.)

2006-09-26  Chris Toshok  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-09-26 21:58:25 UTC (rev 65940)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-09-26 22:02:38 UTC (rev 65941)
@@ -1,5 +1,19 @@
 2006-09-26  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * XplatUIX11.cs (SetWMStyles): turns out when SYSMENU is not set
+       and caption == "", we need to remove the resize handles as well as
+       the title bar.
+
+       * Control.cs (set_Text): turns out that setting Text on a form
+       should change the WM styles on the window, since if ControlBox ==
+       false, the only way to get a window border is to have a non-""
+       Text property.  check winforms/forms/text.cs for an example.  so,
+       call both XplatUI.SetWindowStyle and XplatUI.Text here to properly
+       update both window styles and title.  This fixes a lot of dialogs
+       (including the preferences dialog in MonoCalendar.)
+
+2006-09-26  Chris Toshok  <[EMAIL PROTECTED]>
+
        * XplatUIWin32.cs (SetParent): if parent == IntPtr.Zero (and the
        control isn't a Form), call Win32ShowWindow to hide the window,
        but don't update the control Visible property.  When we reparent

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-09-26 21:58:25 UTC (rev 65940)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-09-26 22:02:38 UTC (rev 65941)
@@ -2423,6 +2423,10 @@
                                if (text!=value) {
                                        text=value;
                                        if (IsHandleCreated) {
+                                               /* we need to call 
.SetWindowStyle here instead of just .Text
+                                                  because the presence/absence 
of Text (== "" or not) can cause
+                                                  other window style things to 
appear/disappear */
+                                               
XplatUI.SetWindowStyle(window.Handle, CreateParams);
                                                XplatUI.Text(Handle, text);
                                        }
                                        OnTextChanged (EventArgs.Empty);

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-09-26 21:58:25 UTC (rev 65940)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2006-09-26 22:02:38 UTC (rev 65941)
@@ -839,7 +839,7 @@
                                        decorations &= ~(MotifDecorations.Menu 
| MotifDecorations.Maximize | MotifDecorations.Minimize);
                                        if (cp.Caption == "") {
                                                functions &= 
~MotifFunctions.Move;
-                                               decorations &= 
~MotifDecorations.Title;
+                                               decorations &= 
~(MotifDecorations.Title | MotifDecorations.ResizeH);
                                        }
                                }
                        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to