* MdiChildContext.cs: reenable the sizing code.
authorJackson Harper <jackson@novell.com>
Wed, 7 Dec 2005 20:07:16 +0000 (20:07 -0000)
committerJackson Harper <jackson@novell.com>
Wed, 7 Dec 2005 20:07:16 +0000 (20:07 -0000)
- When the mouse leaves a window reset its cursor.

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

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

index 698e93f38d277d5aae4c2854210df1b5ff1640c1..066f731c946380e022fd231499806d67c8b4b06a 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-07  Jackson Harper  <jackson@ximian.com>
+
+       * MdiChildContext.cs: reenable the sizing code.
+       - When the mouse leaves a window reset its cursor.
+
 2005-12-07  Alexander Olk  <alex.olk@googlemail.com>
 
        * ThemeClearlooks.cs: Reflect latest Hwnd changes
index 458328a03d965d1f495b1edb332c8651558eb497..761e5d0dd2b98646b0109a8270b884ad3cd37769 100644 (file)
@@ -166,6 +166,10 @@ namespace System.Windows.Forms {
                        case Msg.WM_NCLBUTTONDOWN:
                                return HandleNCLButtonDown (ref m);
 
+                       case Msg.WM_MOUSE_LEAVE:
+                               FormMouseLeave (ref m);
+                               break;
+
                        case Msg.WM_NCPAINT:
 //                             form.UpdateStyles ();
                                PaintWindowDecorations ();
@@ -243,7 +247,6 @@ namespace System.Windows.Forms {
                                return true;
                        }
 
-                       /*
                        if (IsSizable) {
                                SetCursorForPos (pos);
                        
@@ -255,7 +258,6 @@ namespace System.Windows.Forms {
                                form.Capture = true;
                                return true;
                        }
-                       */
 
                        return false;
                }
@@ -309,7 +311,7 @@ namespace System.Windows.Forms {
                                int x = Control.LowOrder ((int) m.LParam.ToInt32 ());
                                int y = Control.HighOrder ((int) m.LParam.ToInt32 ());
                                FormPos pos = FormPosForCoords (x, y);
-                               Console.WriteLine ("position:   " + pos);
+
                                SetCursorForPos (pos);
 
                                ClearVirtualPosition ();
@@ -319,6 +321,11 @@ namespace System.Windows.Forms {
                        return false;
                }
 
+               private void FormMouseLeave (ref Message m)
+               {
+                       form.Cursor = Cursors.Default;
+               }
+
                private void SetCursorForPos (FormPos pos)
                {
                        switch (pos) {