Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcsun!sunic!tut!santra!ado From: ado@cs.hut.fi (Andre Dolenc) Newsgroups: comp.windows.x Subject: Re: Visuals, colormaps, resource db Message-ID: Date: 29 Aug 89 12:05:28 GMT Sender: news@santra.UUCP Organization: Helsinki University of Technology, Finland Lines: 37 > XtRealizeWidget(widget); > XFlush(XtDisplay(widget)); > [stuff] > XtMainLoop(); > > This type of thing doesn't work? When [stuff] is: ... { XWindowAttributes attr; Status xerr; if ((xerr=XGetWindowAttributes(XtDisplay(w),XtWindow(w),&attr)) != Success) { fprintf (stderr, "Failed...%d\n", xerr); exit (xerr);} } prints "Failed...1" on both the Sun and the Tektronix running X11.3. > In R3 the visual is always the default visual of the screen, and unless you > explicitly change the colormap it is also the default colormap of screen. I suspected that, but I did not -- I'm changing my mind on this one -- want to write code on "un-documented obvious" behaviour. > Also, once you have realized a widget the window ID should be valid, and you > can get the attributes of it. Whether or not it is visable on the screen > yet. Sure it is valid. I use the window ID afterwards with no problems. > Don't spend too long on this one, as we are come up with a solution to > the human language problem for R4. Any further information is welcome. Thanxs again for you replies. ----