X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_menu.c;h=d44c6f422e2623ec8dc73823997fffd58e84b5e1;hb=2822fb448bf8ebc2a07fac999d07d1ea522e9964;hp=e60a5f88615de81275f6f5f73f0c1fc235292faf;hpb=378de1f7693a73536400c7de8889d8b6bec1641f;p=freeglut diff --git a/src/fg_menu.c b/src/fg_menu.c index e60a5f8..d44c6f4 100644 --- a/src/fg_menu.c +++ b/src/fg_menu.c @@ -667,10 +667,18 @@ GLboolean fgCheckActiveMenu ( SFG_Window *window, int button, GLboolean pressed, ( window->Menu[ button ] ) && pressed ) { - /* XXX Posting a requisite Redisplay seems bogus. */ - window->State.Redisplay = GL_TRUE; - fghActivateMenu( window, button ); - return GL_TRUE; + /* If mouseclick was outside the parent window, ignore. This can + * happen when another mouse button is already depressed and the + * window thus has mouse capture + */ + if (window->State.MouseX>0 && window->State.MouseY>0 && + window->State.MouseXState.Width && window->State.MouseXState.Height) + { + /* XXX Posting a requisite Redisplay seems bogus. */ + window->State.Redisplay = GL_TRUE; + fghActivateMenu( window, button ); + return GL_TRUE; + } } return GL_FALSE;