Fixed tabs/spaces indentation mistake.
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / InternalWindowManager.cs
index 75536802c04c716288bcdf1d5d94f839ac4d7800..5acda6776cdb752c6bc119faeacca08f1530c0b2 100644 (file)
@@ -239,13 +239,14 @@ namespace System.Windows.Forms {
                                PaintEventArgs pe = XplatUI.PaintEventStart (form.Handle, false);
 
                                Rectangle clip;
-                               if (m.WParam.ToInt32 () > 1) {
-                                       Region r = Region.FromHrgn (m.WParam);
-                                       RectangleF rf = r.GetBounds (pe.Graphics);
-                                       clip = new Rectangle ((int) rf.X, (int) rf.Y, (int) rf.Width, (int) rf.Height);
-                               } else {        
-                                       clip = new Rectangle (0, 0, form.Width, form.Height);
-                               }
+                               // clip region is not correct on win32.
+                               // if (m.WParam.ToInt32 () > 1) {
+                               //      Region r = Region.FromHrgn (m.WParam);
+                               //      RectangleF rf = r.GetBounds (pe.Graphics);
+                               //      clip = new Rectangle ((int) rf.X, (int) rf.Y, (int) rf.Width, (int) rf.Height);
+                               //} else {      
+                               clip = new Rectangle (0, 0, form.Width, form.Height);
+                               //}
 
                                ThemeEngine.Current.DrawManagedWindowDecorations (pe.Graphics, clip, this);
                                XplatUI.PaintEventEnd (form.Handle, false);
@@ -319,7 +320,7 @@ namespace System.Windows.Forms {
                protected virtual void Activate ()
                {
                        // Hack to get a paint
-                       NativeWindow.WndProc (form.Handle, Msg.WM_NCPAINT, IntPtr.Zero, IntPtr.Zero);
+                       //NativeWindow.WndProc (form.Handle, Msg.WM_NCPAINT, IntPtr.Zero, IntPtr.Zero);
                        form.Refresh ();
                }
 
@@ -328,6 +329,7 @@ namespace System.Windows.Forms {
                        return true;
                }
 
+
                private void FormSizeChangedHandler (object sender, EventArgs e)
                {
                        ThemeEngine.Current.ManagedWindowSetButtonLocations (this);
@@ -389,9 +391,8 @@ namespace System.Windows.Forms {
                        int y = Control.HighOrder ((int) m.LParam.ToInt32 ());
                        
                        // Need to adjust because we are in NC land
-                       NCPointToClient (ref x, ref y);\r
+                       NCPointToClient (ref x, ref y);
                        FormPos pos = FormPosForCoords (x, y);
-                       Console.WriteLine ("NC POS:   {0} for coords:  {1}, {2}", pos, x, y);
                        
                        if (pos == FormPos.TitleBar) {
                                HandleTitleBarDown (x, y);
@@ -592,6 +593,8 @@ namespace System.Windows.Forms {
 
                                form.Capture = false;
                                state = State.Idle;
+                               if (form.MdiContainer != null)
+                                       form.MdiContainer.SizeScrollBars();
                        }
                                
                        int x = Control.LowOrder ((int) m.LParam.ToInt32 ());