[comp.windows.x] Window Mapping Problem

nancie@hal.CSS.GOV (Nancie Matson) (12/12/89)

Hi all!

I'm writing to inquire about yet another problem that I am having
trying to use X11.  This time I think it concerns XMapWindow and
XMapSubWindow.

The Scenerio:
   I have opened one window as a child of the root, the user has
   to click the mouse in this window to invoke a sort of pop-up
   menu.  In order to generate the pop-up menu, I am generating
   another window using XCreateSimpleWindow, as a subwindow of
   the first window.  I map both windows using XMapWindow and
   proceed to draw some text, etc. to the screen. 

The problem is that I don't ever get to see what I have drawn.
I know that something is being drawn, since I placed print 
statements all thru the code, but Still I see nothing.

What I am wondering is, Can you have a SubWindow of a SubWindow of
a Window?  If so in what order to they have to mapped, and am I
using the command XCreateSimpleWIndow correctly to obtain a
subwindow??

Please if you have any idea about what I am doing wrong or not
doing at all, please either email to post to the net.  I have been
playing with the code for about 3 days trying to understand what's 
going on, and I'm at my wit's end!!!

Thanx in advance for any help you can provide in my time of great 
need.

nancie
nancie@hal.CSS.GOV


P.S  I am using X11R3 on a Sun 3/110 with OS4.0.3 and the Purdue
     Speedups V2.1.

klee@chico.pa.dec.com (Ken Lee) (12/15/89)

In article <202@hal.CSS.GOV>, nancie@hal.CSS.GOV (Nancie Matson) writes:
> The problem is that I don't ever get to see what I have drawn.
> I know that something is being drawn, since I placed print 
> statements all thru the code, but Still I see nothing.

Sounds like you're not waiting for expose events before drawing on a
newly mapped window.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@decwrl.dec.com
uucp: uunet!decwrl!klee