If you pop-up a menu and then click another
(non-freeglut) window, you will see the menu still
active (and possibly hide the part of the focused window).
This behavior is inconsistent with the comment in
| * - Down-click any button outside the menu, menu active:
| * deactivate the menu
Here is a patch.
This only fixes bugs on X11. I don't know whether there
exists this problem on WIN32.
INTERNAL MACROS in this patch:
This patch uses XGrabPointer(). If you don't want to
use XGrabPointer() (typically in debugging), set
USE_XGRAB to 0. If USE_XGRAB is 0, this patch has no
effect at all.
We have two candidates about correct behavior.
"Down-click event (which caused menu deactivation)
should be sent to the underlying window?"
If USE_XTESTFAKEBUTTONEVENT is 0 down-click event
sent to the underlying window.
If USE_XTESTFAKEBUTTONEVENT is 1 down-click event
to the underlying window.
This patch contains several hacks related to
Bugs#1051977. If you already fixed Bugs#1051977,
feel free to set NO_MULTIPARENTSMENU_HACK to 0.
As I'm not familiar with autoconf, please add "-lXtst"
in link options manually when you set
USE_XTESTFAKEBUTTONEVENT to 1.
I followed the comment in freeglut_main.c#814:
| * XXX This isn't enough. A downclick outside of
| * XXX the interior of our freeglut windows should also
| * XXX deactivate the menu. This is more complicated.
Log in to post a comment.