Subject: bug#55203: 29.0.50; MSW menu bar help text doesn't show when blink-cursor-mode is off

From: Eli Zaretskii <[email-masked]>
Date: Sun, 01 May 2022 10:10:43 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 01 May 2022 14:32:14 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > This is a well-known problem.  It is caused by the implementation of
> > Emacs menus on MS-Windows: we start a separate message loop for
> > handling the menu events, and this suspends the main event loop.  When
> > blink-cursor-mode is ON, the timer causes the main event loop to turn
> > a notch, and then Emacs produces the help-echo for the menu item; but
> > without cursor blinking and no other sources of async input events,
> > that doesn't happen.
> 
> Thanks.  Could you point to where that "separate message loop" is
> started?  I couldn't find anything in w32menu.c.

It's in w32fns.c, under WM_EMACS_TRACKPOPUPMENU.  w32menu.c sends the
WM_EMACS_TRACKPOPUPMENU message to the main window procedure when the
menu is ready to be displayed.  We then call TrackPopupMenu and
discard any mouse events except those which select a menu item (AFAIU
what happens there; I'm nowhere close to being an expert on this
stuff).