Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!sunic!tut!santra!ado From: ado@hutcs.hut.fi (Andre Dolenc) Newsgroups: comp.windows.x Subject: Re: Visuals, colors, resource db Message-ID: Date: 25 Aug 89 08:50:32 GMT Sender: news@santra.UUCP Organization: Helsinki University of Technology Lines: 32 >> Xt question: Between a call to root=XtInitialize (or equivalent) and the >> XtRealizeWidget(root), how can one select the appropriate Visual?.... >A visual field will be added to the Shell widget in Release 4. Until then >there is little you can do, short of writing your own widget that has a >visual field. >> XGetWindowAttributes and XAllocNamedColor return BadRequest. These Xlib >> routines where used between the calls to XtRealizeWidget and XtMainLoop. >You need to flush the event queue. Take a look at XFlush(). 1. I tried XFlush and XSync to no avail... It seems to me that I must force the root window to be displayed before I can use these calls. What is there in XtMainLoop that does this? XtNextEvent? 2. On the other hand, I need the window attr's in order to know which Visual and Colormap where assigned to it. Thus, these 2 prblms are related. I will try to write my own realize proc for the root widget. Any other suggestions? >> Resource database question: I have an application-dependent resource >> db which I would like to merge with the one returned by XtDatabase. >How about using an app-defaults file instead? This way the toolkit >will merge your resources in for you. Yes, I thought of that. But I have at least 2 resource files which must be loaded; one of them is (human) language dependent. Thanx a lot for your reply. -----