Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!argv From: argv@turnpike.Eng.Sun.COM (Dan Heller) Newsgroups: comp.windows.x.motif Subject: Re: problems creating and destroy app shells Message-ID: <3820@exodus.Eng.Sun.COM> Date: 1 Dec 90 08:13:03 GMT References: <5613@mnetor.UUCP> Sender: news@exodus.Eng.Sun.COM Organization: O'Reilly && Associates Lines: 47 In article <5613@mnetor.UUCP> charles@mnetor.UUCP (Charles Stoner) writes: > I am having trouble creating (and destroying) application shells. The code > below is a distilled version of the original source so while it may not do > anything useful, all lines have a purpose. I wonder if you'd have the same problem if you use XtVaCreatePopupShell() rather than > Widget shell = XtCreateApplicationShell("shell", > transientShellWidgetClass,NULL,0); if you'd get the same problem. I am having problems creating multiple toplevel shells using XtVaAppCreateShell() with DialogShell widgets. The exact same thing works fine using XtCreatPopupShell(), but not otherwise. The problem only occurs when I try to create a second shell ... no matter which shell is created first, it works fine, but any subsequent shell created crashes. And while I'm griping about shells :-)... Maybe someone can comment on the following.. If you create dialog shells that are "popup shells" from a parent shell, then those dialogs are part of the parent's "group" and will be iconified when the parent is. The problem is, you can't raise the parent to be *over* it's dialogs... The dialogs are also popped up at 0,0 (topleft corner of screen) rather than anywhere you try to position them using XmNx or XmNy. Even if you do this in a mapCallback function. You also can't set these dialogs' colors easily in app-defaults files ... basically, this all happens with: frame = XtVaCreatePopupShell(NULL, xmDialogShellWidgetClass, parent, ...args..., NULL); However, the problem goes away when I do: frame = XtVaAppCreateShell("name", "Class", xmDialogShellWidgetClass, display, ...args..., NULL); But, the latter case causes the problems mentioned in the beginning. Does anyone have any suggestions? -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.