home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!gatech!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
- From: converse@expo.lcs.mit.EDU (Donna Converse)
- Subject: Re: cursor in spring-loaded menu
- Message-ID: <9207272309.AA18582@excess.lcs.mit.edu>
- Sender: daemon@athena.mit.edu (Mr Background)
- Organization: X Consortium, MIT Laboratory for Computer Science
- References: <199207232056.AA24939@juno.astro.umd.edu>
- Date: Mon, 27 Jul 1992 23:09:56 GMT
- Lines: 40
-
-
- > I have a menu widget which I have written intended to be used as a
- > spring-loaded popup when a button is pressed (by means of an XtMenuPopup() in
- > the translations). While the menu is popped up I would like the cursor to have
- > some special shape. It seems to be hard to do this.
-
- Right.
-
- > The widget does have a cursor resource.
- > It is used in the widget's realize method to set the cursor for the widget's
- > window. My problem (or complaint?) is that when the widget it is popped up
- > with the XtMenuPopup action that this resource has no effect. The cursor
- > used seems to alway be that of window of the widget making the grab. I believe
- > that this is because XtMenuPopup (as far as I can figure out) makes an
- > XButtonGrab with cursor of None.
-
- You are right.
-
- > I know that the resource is properly set because I successfully used it in
- > the XChangeActivePointerGrab() call.
-
- That's what you have to do, make a call to XChangeActivePointerGrab to get
- the menu to use a cursor other than the cursor supplied by the grabbing window.
-
- > I still don't see how I can get the behavior I want
- > (the grab done with the menu's cursor rather than with the grabbing window's
- > cursor) without writing my own version of the XtMenuPopup() action routine or
- > by the use of XChangeActivePointerGrab().
-
- The Xaw Simple Menu widget makes a call to XChangeActivePointerGrab in a callback
- registered on the popupCallback list. These callbacks will be called before
- the menu widget is mapped, through XtPopupSpringLoaded, which is called
- through XtMenuPopup, the action you use to pop up the menu. So, you're right,
- sorry I got confused by this one. The menu widget that you are writing would
- register this callback in its Initialize method.
-
-
- Donna Converse
- MIT X Consortium
-
-