Oct 17, 2021, 2:13:52 PM10/17/21
when testing the Wayland port (commit 611fe0fee48cea6) for a totally
different reason  I found a crash related to menu handling.
My demo program is attached as menu_test.cxx. The crash happens when you
open a menu as advised by the program, then move the mouse away from the
menu and wait for the popup (all within 5 seconds after the start).
Close the popup (the menu is still open), move back to the menu, and
move the mouse around so that another menu item opens. Or something very
If you miss the 5 second interval you can use the "Restart Timer" menu
for another test.
Stack trace attached: crash.txt. The top two lines (#0 and #1) show the
The fix is to provide another "target" (whatever that means here, I just
fixed the symptoms). Maybe the patch must be totally different. My proof
of concept is attached as wayland_menu_crash.diff. It fixes the crash
Not directly related: I observed some menu positioning issues after the
test scenario is completed (after the patch was applied). I found
similar issues with other WM's, so this may not be the fault of the
A second Wayland port related issue is that the menus are not positioned
correctly after pressing ctrl/+/- to zoom. It seemed to work fine if you
set the FLTK_SCALING_FACTOR env. variable before the start, but I'm not
entirely sure about the latter.
Other than that, I didn't have much time to test the Wayland port but
I'll go ahead and do some more tests. Thanks for the great work!
 STR #1986, STR #1896, and STR 3179 are about similar menu issues in
conjunction with popup message. I thought this issue was generally fixed
but today I managed to crash my WM (Linux Mint: Cinnamon) with such a
menu/popup test. I tested with different WM's and found totally
different behaviors. One of my tests was Wayland (Weston).