Author: gonzalo
Date: 2006-05-25 21:32:06 -0400 (Thu, 25 May 2006)
New Revision: 61148
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/LinkLabel.cs
Log:
2006-05-25 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* Control.cs: allow changing the cursor when the mouse position is
out of bounds but Capture is set.
* LinkLabel.cs: handle the case when the mouse button is pressed on the
linklabel but released somewhere else.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-05-26 00:16:23 UTC (rev 61147)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-05-26 01:32:06 UTC (rev 61148)
@@ -1,3 +1,10 @@
+2006-05-25 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * Control.cs: allow changing the cursor when the mouse position is
+ out of bounds but Capture is set.
+ * LinkLabel.cs: handle the case when the mouse button is pressed on the
+ linklabel but released somewhere else.
+
2006-05-25 Jackson Harper <[EMAIL PROTECTED]>
* TreeView.cs: When we get focus if there is no selected node make
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2006-05-26 00:16:23 UTC (rev 61147)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2006-05-26 01:32:06 UTC (rev 61148)
@@ -1787,7 +1787,7 @@
if (IsHandleCreated) {
pt = Cursor.Position;
- if (bounds.Contains(pt)) {
+ if (bounds.Contains(pt) ||
Capture) {
if (GetChildAtPoint(pt)
== null) {
if (cursor !=
null) {
XplatUI.SetCursor(window.Handle, cursor.handle);
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
2006-05-26 00:16:23 UTC (rev 61147)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
2006-05-26 01:32:06 UTC (rev 61148)
@@ -388,8 +388,12 @@
protected override void OnMouseMove (MouseEventArgs e)
{
+ if (e.X >= 0 && e.Y >= 0 && e.X < bounds.Width && e.Y <
bounds.Height) {
+ UpdateHover (PointInLink (e.X, e.Y));
+ } else if (Capture) {
+ Cursor = Cursors.Default;
+ }
base.OnMouseMove (e);
- UpdateHover(PointInLink (e.X, e.Y));
}
protected override void OnMouseUp (MouseEventArgs e)
@@ -398,10 +402,11 @@
base.OnMouseUp (e);
this.Capture = false;
-
+ bool onclick = (e.X >= 0 && e.Y >= 0 && e.X <
bounds.Width && e.Y < bounds.Height);
for (int i = 0; i < num_pieces; i++) {
if (pieces[i].link!= null && pieces[i].clicked
== true) {
- OnLinkClicked (new
LinkLabelLinkClickedEventArgs (pieces[i].link));
+ if (onclick)
+ OnLinkClicked (new
LinkLabelLinkClickedEventArgs (pieces[i].link));
pieces[i].clicked = false;
Invalidate (pieces[i].rect);
break;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches