[Mono-bugs] [Bug 76159][Wis] New - Menu not hidden when clicking outside of menu

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 20 00:04:31 EDT 2005

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 peter at novonyx.com.


--- shadow/76159	2005-09-20 00:04:31.000000000 -0400
+++ shadow/76159.tmp.15755	2005-09-20 00:04:31.000000000 -0400
@@ -0,0 +1,39 @@
+Bug#: 76159
+Product: Mono: Class Libraries
+Version: 1.1
+OS: SUSE 9.2
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com                            
+ReportedBy: peter at novonyx.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Menu not hidden when clicking outside of menu
+Run the attached app, and click on "File" and then click inside the 
+application window. The menu popup will not disappear.
+Debugging the issue I found:
+1) When File is clicked, the menu is displayed via TrackPopupMenu
+2) TrackPopupMenu calls ShowWindow (which ultimately sets the Popup to 
+3) TrackPopupMenu runs it's message loop.
+4) While in that loop, the mouse click comes by, and OnMouseDownPUW calls 
+HideWindow (which ultimately sets the popup to invisible)
+5) TrackPopupMenu leaves it's message loop, the main message loop 
+continues processing
+6) A MouseMove for the menu bar is pulled from the queue by the main loop
+7) TrackMouseBar is called by MainMenu.MouseMove
+8) MenuBarMove is called by TrackMouseBar
+9) TrackPopupMenu is called by MenuBarMove
+10) TrackPopupMenu shows the window that was set hidden in step 4) again
+Seems that that sequence of events is a bit wrong. This is happening on 
+Linux. Strangely enough, it does work on Win32, it might be due to 
+different order of events coming through the queue.

More information about the mono-bugs mailing list