[Mono-bugs] [Bug 71495][Wis] Changed - Error in MainMenu with one MenuItem

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 19 Jan 2005 21:08:44 -0500 (EST)


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 rogerio.araujo@gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=71495

--- shadow/71495	2005-01-19 19:09:16.000000000 -0500
+++ shadow/71495.tmp.7266	2005-01-19 21:08:44.000000000 -0500
@@ -92,6 +92,33 @@
 		}
 	}
 }
 
 ------- Additional Comments From rogerio.araujo@gmail.com  2005-01-19 19:00 -------
 *** Bug 71496 has been marked as a duplicate of this bug. ***
+
+------- Additional Comments From rogerio.araujo@gmail.com  2005-01-19 21:08 -------
+Some changes in MenuBarMove fix the bug, but now i can't fire the
+OnClick event handle on the example above, and after click the
+menuitem isn't deselected.
+
+Here's the MenuBarMove with changes:
+
+
+		static private void MenuBarMove (IntPtr hMenu, MENUITEM item,
+TRACKER tracker)
+		{
+			MENU menu = GetMenuFromID (hMenu);
+			Point pnt = new Point (item.rect.X, item.rect.Y + item.rect.Height);
+			pnt = menu.Wnd.PointToScreen (pnt);
+
+			MenuAPI.SelectItem (hMenu, item, false, tracker);
+			HideSubPopups (tracker.hCurrentMenu);
+			tracker.hCurrentMenu = hMenu;
+			
+                        //My change is test if exist a menu handle if
+not exits the method  
+			if (hMenu != IntPtr.Zero)
+			    return;
+			
+			MenuAPI.TrackPopupMenu (hMenu, item.hSubMenu, pnt, false, null);
+		}