Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!erb1!serv1!osswald From: osswald@serv1.uucp (Tim Osswald) Newsgroups: comp.windows.x.motif Subject: Help with application positioning (follow-up) Message-ID: <244@erb1.engr.wisc.edu> Date: 21 Aug 90 03:06:37 GMT Sender: news@erb1.engr.wisc.edu Distribution: usa Organization: Computer Aided Engineering Center, University of Wisconsin-Madison Lines: 68 Hello again, I have got things running now so that my window opens on 0,0. This was done by putting the line XCadPress*geometry: +0+0 in my Xdefaults file. Even though this is a good temporary solution, I would still much prefer to set this in the program, It is too easy for someone not to know to do this, and mess up the way the program is displayed. I then tried taking Michael Yee's suggestion to set these resources on my toplevel shell. It still doesn't set the x and y (don't know why) but I now at least get the proper window title. I also already have Mwm*clientAutoPlace set to False. Here is the relevant code of my program: MrmInitialize(); XtToolkitInitialize(); draw_display = XtOpenDisplay(NULL,NULL,"XCadPress", "XCadPress",NULL,0,&argc,argv); i=0; XtSetArg(args[i],XmNheight,750); i++; XtSetArg(args[i],XmNwidth,750); i++; XtSetArg(args[i],XmNx,0); i++; XtSetArg(args[i],XmNy,0); i++; XtSetArg(args[i],XmNtitle,window_name); i++; toplevel=XtAppCreateShell("XCadPress","XCadPress", applicationShellWidgetClass,draw_display,args,i); if (MrmOpenHierarchy(db_filename_num,db_filename_vec, NULL,&s_DRMHierarchy) != MrmSUCCESS) { printf("Error opening Hierarchy! \n"); exit(-1); } MrmRegisterNames(reglist, reglist_num); if (MrmFetchWidget(s_DRMHierarchy,"S_MAIN_WINDOW",toplevel, &main_widget, &dummy_class) != MrmSUCCESS) { printf("Error opening main window! \n"); exit(-1); } XtManageChild(main_widget); XtRealizeWidget(toplevel); XtMainLoop(); Sorry to keep this topic running but I need to get this to work right, and several people mailed me to keep them informed on any developments, they appear to be having the same problems I am. Again please direct any replies to address at the bottom. -john- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John Hester internet: hester@ececci.ece.wisc.edu VAX Systems Manager bitnet: hester%ececci.decnet@wiscmacc Departement of Electrical Engineering University of Wisconsin - Madison ------------------------------------------------------------------------------- badgers --- BADGERS ---- we don't need no stinking BADGERS! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=