Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!shelby!portia!drapeau From: drapeau@choctaw.Stanford.EDU (George Drapeau) Newsgroups: comp.windows.x Subject: I Need Help with Popup Shells Message-ID:Date: 13 Aug 89 05:33:16 GMT Sender: USENET News System Organization: Interactive Classroom Experiment, Stanford University Lines: 64 Included in this posting is a short X Toolkit program I wrote to test popup shells. The program makes two shells, each with a Box containing a Command widget. There are a couple of strange things about this (seemingly) simple program, though. First of all, the popup widget doesn't get its own title bar (I use twm as my window manager, if that makes a difference). Also, if I put the "XtPopup(popup)" call after the XtRealizeWidget(topLevelShell) call, I don't even get the popup shell. Why is this, and where could I have read to understand why? Platform: Sun4/110, SunOS4.0.1, X11R3 (with patches 1-9 + Purdue Speedups). This same behavior occurs on a microVAX 3200, too. Any help you could provide (including pointers to the relevant documentation) would be greatly appreciated. Thanks in advance, George ------------ cut here ------------ #include #include #include #include #include #include Widget topLevelShell,popup; void main(argc,argv) int argc; char **argv; { Widget box,command; void MakePopup(); topLevelShell = XtInitialize("small","Test",NULL,0,&argc,argv); box = XtCreateManagedWidget("Box",boxWidgetClass,topLevelShell,NULL,0); command = XtCreateManagedWidget("Command",commandWidgetClass,box,NULL,0); MakePopup(); XtPopup(popup);/* Try moving this after the "XtRealizeWidget" line...*/ /* ... and see what happens. */ XtRealizeWidget(topLevelShell); XtMainLoop(); } void MakePopup() { Widget myBox,myCommand; popup = XtCreatePopupShell("Pop",shellWidgetClass,topLevelShell,NULL,0); myBox = XtCreateManagedWidget("box2",boxWidgetClass,popup,NULL,0); myCommand = XtCreateManagedWidget("Push",commandWidgetClass,myBox,NULL,0); } -- ______________________________________________________________________________ George D. Drapeau Internet: drapeau@jessica.stanford.edu Academic Information Resources Stanford University