Author: jpobst
Date: 2008-01-17 16:33:45 -0500 (Thu, 17 Jan 2008)
New Revision: 93207
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
Log:
2008-01-17 Jonathan Pobst <[EMAIL PROTECTED]>
* MenuAPI.cs: Windows sends us MOUSEMOVE messages when any key is
pressed.
If the mouse hasn't actually moved, ignore these messages so the
currently
highlighted menuitem isn't reset to the one under the mouse.
[Fixes bug #333668]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-01-17 21:23:37 UTC (rev 93206)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-01-17 21:33:45 UTC (rev 93207)
@@ -1,3 +1,10 @@
+2008-01-17 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * MenuAPI.cs: Windows sends us MOUSEMOVE messages when any key is
pressed.
+ If the mouse hasn't actually moved, ignore these messages so the
currently
+ highlighted menuitem isn't reset to the one under the mouse.
+ [Fixes bug #333668]
+
2008-01-17 Ivan N. Zlatev <[EMAIL PROTECTED]>
* PropertyGridView.cs: When the property changes Invalidate the GridItem
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
2008-01-17 21:23:37 UTC (rev 93206)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs
2008-01-17 21:33:45 UTC (rev 93207)
@@ -44,7 +44,8 @@
public Menu CurrentMenu;
public Menu TopMenu;
Form grab_control;
-
+ Point last_motion = Point.Empty;
+
public MenuTracker (Menu top_menu)
{
TopMenu = CurrentMenu = top_menu;
@@ -178,6 +179,13 @@
public void OnMotion (MouseEventArgs args)
{
+ // Windows helpfully sends us MOUSEMOVE messages when
any key is pressed.
+ // So if the mouse hasn't actually moved since the last
MOUSEMOVE, ignore it.
+ if (args.Location == last_motion)
+ return;
+
+ last_motion = args.Location;
+
MenuItem item = GetItemAtXY (args.X, args.Y);
UpdateCursor ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches