Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ncis.llnl.gov!ncis!helios.ee.lbl.gov!nosc!ucsd!ucbvax!bloom-beacon!ATHENA.MIT.EDU!kit From: kit@ATHENA.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: XtPopup Questions Message-ID: <8901181847.AA08405@DORA.MIT.EDU> Date: 18 Jan 89 18:46:57 GMT References: <352@wuibc.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 49 [ FROM: wucs1!wuibc!andrew@uunet.uu.net (Andrew Loth) ] > In article <113@digitran.UUCP> pja@digitran.UUCP (Pete Alleman) writes: > > > >We would like to popup a topLevelShellWidget at a program controlled > >position. Currently, when we try we are prompted to give a position with > >the mouse. How can we bypass the prompt for position?? > This can be done by setting the XtNoverrideRedirect resource of the shell > widget to True. True, But this is being very unfriendly to the window manager, and basically saying that it should completly ignore this window. While this may be okay for popup menus, it is not always the right thing to do when you want to place a window on the screen at a given location. Please don't use override redirect unless you are putting up a very tempory window. I good rule of thumb is don't do a override redirect unless you are also doing a pointer grab. [ FROM: jdp@hippocrene.mit.edu ] > The problem that I see with this is that the geometry is relative to the > widget's parent (i.e. the root window) [ Parent of the Widget's window is a better discription. In this case, the root window of the screen. ] > which make positioning the menu > relative to its logical parent (i.e. the widget that interpreted the > keyclick which poped up the popup). Am I missing something? No you are not missing anything, But you can use XtTranslateCoords() to find the actual location. > I tried recomputing the absolute position on the screen before > poping up the widget. That worked the first time but failed when > I tried repositioning/resising the topLevelShell widget. Possible that either your window manager or application (Xt??) is confused, but without more info it is hard to say. Chris D. Peterson MIT X Consortium / Project Athena Net: kit@athena.mit.edu Phone: (617) 253 - 1326 USMail: MIT - Room E40-321 77 Massachusetts Ave. Cambridge, MA 02139