Re: XForms: Unknown type 2 ?

Steve Lamont (
Thu, 22 May 97 08:35:57 PDT

To subscribers of the xforms list from (Steve Lamont) :

> > ****CreateWin OK**** sleeping 3 seconds
> > waiting Event(22,w=0x2400039 s=689) ConfigureNotify (64,64) w=610 h=440 Syn
> > waiting Event(19,w=0x2400039 s=691) MapNotify
> > waiting Event(12,w=0x2400039 s=691) Expose count=0 serial=2b3
> > In EventCallback [events.c 37] Unknown window=0x2400039
> > Ignored Event(12,w=0x2400039 s=691) Expose count=0 serial=2b3
> Should I worry about these? They also appear when I run on a machine on which
> the program works properly. (Or at least I thought it did...)

The Unknown window messages? I think they're normal. They involve
the way the XForms does its internal bookkeeping -- I think the Expose
event when a form is created arrives before XForms has registered the
window in its internal list.

> Later on, the "Unknown type : 2" error occurs in this context:
> [...]
> > In xtext.c[341]: FontResolution: 138
> > In ObjPixmap [xsupport.c 228] Creating depth=24 for
Is this line complete?

> Followed by more "Unknown window"s, and eventually the X error
> > In Canvas [canvas.c 347] FL_DRAW
> > X Error of failed request: BadMatch (invalid parameter attributes)
> > Major opcode of failed request: 1 (X_CreateWindow)
> > Serial number of failed request: 12599
> > Current serial number in output stream: 12600

Canvases are somewhat of a problem -- they don't always get created
with the right attributes. Is this an OpenGL program perchance? I
found that the gl.c code as distributed with the library doesn't
always do the Right Thing with respect to Colormaps. I made this
modification to glx_init():

(output from diff)
> int screen_number;
> Visual *default_visual;
< fl_set_canvas_colormap(ob, fl_create_colormap(vi, 1));

>     screen_number = DefaultScreen( fl_get_display() );
>     default_visual = DefaultVisual( fl_get_display(), screen_number );
>     if ( default_visual->class != vi->visual->class )
>       fl_set_canvas_colormap(ob, fl_create_colormap(vi, 1));
>     else
>       fl_set_canvas_colormap( ob, 
>                               DefaultColormap( fl_get_display(),
>                                                screen_number ) );

I'm not sure if this will help but it fixed a couple of problems I had with OpenGL and/or MesaGL. Unfortunately I did it so long ago I don't recall the reasoning (if any) that lead me to that solution. Colormaps and Visuals always give me a headache.

You might want to run the application with -debug set to 5. That will cause XForms to be very verbose in its debugging messages.

BTW, what version of XForms are you running? You may have said earlier but I've forgotten.

spl _________________________________________________ To unsubscribe, send the message "unsubscribe" to or see Xforms Home Page: List Archive: