Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!agate!ucbvax!ucsfcgl!dufy.mmwb.ucsf.edu!kneller From: kneller@dufy.mmwb.ucsf.edu (Don Kneller) Newsgroups: comp.windows.open-look Subject: Re: Window (frame) placement problems Message-ID: Date: 5 Mar 91 20:11:29 GMT References: <1991Mar4.143744.8224@aucs.AcadiaU.ca> Sender: daemon@cgl.ucsf.edu Distribution: na Lines: 40 871579l@aucs.AcadiaU.ca (Todd Lowe) writes: >I'm having a few problems getting x-view to put my windows where I want >them. I want the first to open anywhere, but the second to open >directly below it on the display. I would have thought XV_X and XV_Y could be used for positioning windows relative to the server, but in fact they are used for positioning items on panels. I have used frame_{g|s}et_rect() successfully: /* * Create main and mode objects */ main_obj = main_main_objects_initialize(NULL, NULL); mode_obj = main_popup_objects_initialize(NULL, main_obj->main); /* * Position the window and popup (subframe) */ frame_get_rect((Frame) main_obj->main, &rect); left = rect.r_top = rect.r_left = 0; bottom = rect.r_top + rect.r_height; frame_set_rect((Frame) main_obj->main, &rect); frame_get_rect((Frame) mode_obj->popup, &rect); rect.r_left = left; rect.r_top = bottom; frame_set_rect((Frame) mode_obj->popup, &rect); /* * Show them. */ xv_set(main_obj->main, XV_SHOW, TRUE, 0); xv_set(mode_obj->popup, XV_SHOW, TRUE, 0); - don