- // Try the window the menu was popped up from or its menu bar belongs to
- if ( win && win->HandleWindowEvent(event) )
- return true;
+ // If this menu is part of the menu bar, process the event there: this will
+ // also propagate it upwards to the window containing the menu bar.
+ if ( mb )
+ return mb->HandleWindowEvent(event);
+
+ // Try the window the menu was popped up from.
+ if ( win )
+ return win->HandleWindowEvent(event);