Path: utzoo!attcan!uunet!wuarchive!wugate!wuibc!andrew From: andrew@wuibc.UUCP (Andrew Loth) Newsgroups: comp.windows.x Subject: Re: Questions on popups. Message-ID: <368@wuibc.UUCP> Date: 26 Aug 89 18:16:40 GMT References: <8908241900.AA29986@expo.lcs.mit.edu> Sender: andrew@wuibc (Andrew Loth) Reply-To: andrew@wuibc.UUCP (Andrew Loth) Organization: Washington University in St. Louis Lines: 34 In article <8908241900.AA29986@expo.lcs.mit.edu> kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) writes: > > >> "X Toolkit Warning: Pop-up menu creation is only supported on ButtonPress or >> EnterNotify events." >> What does this mean? > >It means that popuping up your menus using MenuPopup() is not supported >on an enter-window event. You must use a button or keypress event with >menu popup. It looks like the error message is incorrect. > > Chris D. Peterson > MIT X Consortium According to the documentation (X Toolkit Intrinsics - C Language Interface, section 5.4) MenuPopup IS supported on EnterWindow events: If MenuPopup is invoked on EnterWindow ( possibly with modifiers ), the translation manager pops up the shell wqith grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation managergenerates an error. The action procedure in TMstate.c appears to do what the documentation says. This warning message is caused by a problem in the _XtRegisterGrabs procedure in TMstate.c, which is called during the initialization of widgets. This doesn't prevent the action from working, it only prints out the warning and continues as if nothing wrong happened (which is the case). You can get rid of this warning by adding a 'case EnterNotify: break;' line to the end of the switch statement in _XtRegisterGrabs (before the 'default:'). Andrew T. Loth andrew@wubcl.wustl.edu Biomedical Computer Laboratory Institute For Biomedical Computing Washington University, St. Louis, MO