[Mono-bugs] [Bug 80546][Nor] New - Mouse does not seem to be captured properly
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jan 18 09:24:30 EST 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by georgegiolfan at yahoo.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80546
--- shadow/80546 2007-01-18 09:24:30.000000000 -0500
+++ shadow/80546.tmp.25403 2007-01-18 09:24:30.000000000 -0500
@@ -0,0 +1,67 @@
+Bug#: 80546
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: georgegiolfan at yahoo.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Mouse does not seem to be captured properly
+
+Description of Problem:
+A Form does not seem to capture the mouse when you left-click on it.
+
+Steps to reproduce the problem:
+1. Compile and run the following program.
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+class TestForm : Form {
+ static void Main() {
+ Application.Run(new TestForm());
+ }
+ public TestForm() {
+ Controls.Add(new TestControl());
+ }
+ class TestControl : Control {
+ public TestControl() {
+ BackColor = Color.Red;
+ Size = new Size(100, 100);
+ Cursor = Cursors.AppStarting;
+ }
+ protected override void OnMouseEnter(EventArgs e) {
+ base.OnMouseEnter(e);
+ BackColor = Color.Blue;
+ }
+ protected override void OnMouseLeave(EventArgs e) {
+ base.OnMouseLeave(e);
+ BackColor = Color.Red;
+ }
+ }
+}
+2. Place the mouse cursor over the window client area, but not over the
+child control (red area).
+3. Press and hold the left button.
+4. Move the cursor over the child control.
+
+Actual Results:
+The cursor changes, and the OnMouseEnter and OnMouseLeave methods are
+called.
+
+Expected Results:
+Those things happen only after the button is released.
+
+How often does this happen?
+Always (on SVN version on Windows).
+
+Additional Information:
+It may have something to do with the fact that the MWF version of
+ContainerControl.WndProc only calls OnMouseDown for WM_LBUTTONDOWN.
More information about the mono-bugs
mailing list