https://bugs.winehq.org/show_bug.cgi?id=40474
--- Comment #1 from Vincent Povirk madewokherd@gmail.com --- Well, I feel stupid now.
The X11 driver can't set the capture on a hidden window, and MENU_InitTracking is called before the popup menu is shown.
Since I've proven unable to fix this limitation in the X11 driver, all I can suggest is reverting the patch. I don't know of any real programs that needed it.