Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!STOUT.ATD.UCAR.EDU!corbet From: corbet@STOUT.ATD.UCAR.EDU (Jonathan Corbet) Newsgroups: comp.windows.x Subject: Passive pointer grabs and Xaw menus Message-ID: <9009131903.AA02195@mead.atd.ucar.edu> Date: 13 Sep 90 19:03:16 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 33 I have an interesting problem here. We have implemented our own "graphics widget" for the presentation of real time meteorological data. This widget is actually subclassed from "composite", since we want to be able to put other widgets inside it -- active objects on the screen, and so on. It's really simple, with the most permissive geometry manager possible. It works great, until... You see, some of these managed child widgets are Xaw menuButton widgets. And they work great. But, it is also desirable to have the mouse buttons do things in the basic graphics window, such as pop up a simpleMenu. I managed to create an action which will do that, once I've registered it with XtRegisterGrabAction. BUT, as soon as I do that, the menuButtons cease to work. The pointer events go right through them to the graphics widget. A little research found the problem: apparently it is not possible to put a passive pointer grab on a window if an ancester window has done such a grab. Thus, as soon as I ask for popup menus in my graphics widget, the menu buttons can't do their grabs any more, and thus break. My questions: 1) Why is this the case? What would be wrong with allowing passive grabs in children of other windows which have already established grabs? 2) Any suggestions as to how I could get around this one? Many thanks, Jonathan Corbet National Center for Atmospheric Research, Atmospheric Technology Division corbet@stout.atd.ucar.edu