pja@digitran.UUCP (Pete Alleman) (01/11/89)
Two quick questions: We have a topLevelShellWidget displayed with XtPopup. Once the widget is in iconic form, we can no longer pop it down nor can we change it from iconic form to non-iconic form from the driver program. How can we get control of it again? 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?? We are using the X Toolkit and the uwm window manager with X11r3 on a Sun 386i. Any help would be greatly appreciated. --- Pete Alleman Digitran Systems, Inc. P.O. Box 53984 pja @ digitran Lafayette, La 70505 +318-237-0920 -- --- Pete Alleman Digitran Systems, Inc. P.O. Box 53984 pja @ digitran Lafayette, La 70505 +318-237-0920
pja@digitran.UUCP (Pete Alleman) (01/11/89)
Two quick questions: We have a topLevelShellWidget displayed with XtPopup. Once the widget is in iconic form, we can no longer pop it down nor can we change it from iconic form to non-iconic form from the driver program. How can we get control of it again? 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?? We are using the X Toolkit and the uwm window manager with X11r3 on a Sun 386i. Any help would be greatly appreciated. -- --- Pete Alleman Digitran Systems, Inc. P.O. Box 53984 pja @ digitran Lafayette, La 70505 +318-237-0920
andrew@wuibc.UUCP (Andrew Loth) (01/13/89)
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. Andrew Loth andrew@wubcl.wustl.edu Biomedical Computer Laboratory Institute for Biomedical Computing Washington University in St. Louis
kit@ATHENA.MIT.EDU (Chris D. Peterson) (01/13/89)
> We have a topLevelShellWidget displayed with XtPopup. Once the > widget is in iconic form, we can no longer pop it down nor can we > change it from iconic form to non-iconic form from the driver > program. How can we get control of it again? The problem is that the toolkit and window manager must agree on how to do this, and until the ICCCM is "officially" a standard there is no way to do this. This will be fixed when there is a real ICCCM complient window manager and Toolkit, until then... > 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?? If you specify a geometery string for the widget via its "geometry" resource the window will pop up where specified. The best method of doing this is in an applicaion defaults file. 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
JDP@HIPPOCRENE.MIT.EDU (John Pararas) (01/13/89)
My being new to the X windows environment has much to do with this I'm sure but I do not understand the positioning concepts for popup widgets. Chris says: > If you specify a geometery string for the widget via its "geometry" resource > the window will pop up where specified. The best method of doing this is in > an applicaion defaults file. The problem that I see with this is that the geometry is relative to the widget's parent (i.e. the root window) 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? 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. John D. Pararas MIT/Flight Trasnportation Lab Net: jdp@hippocrene.mit.edu Off: MIT/Flight Transportation Lab Rm 33-408 77 Mass Ave. Cambridge, Ma. 02139 (617) 253-7504
kit@ATHENA.MIT.EDU (Chris D. Peterson) (01/19/89)
[ 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