XForms: Still unable to catch Expose event properly

Francine Taylor (crystalx@teleport.com)
Tue, 8 Jul 1997 11:21:18 -0700 (PDT)

To subscribers of the xforms list from Francine Taylor <crystalx@teleport.com> :

The following are called just before the show_form call in the main
program.

fl_addto_selected_xevent(FL_ObjWin(gpGlunk->button1, ExposureMask);
fl_register_raw_callback(gpGlunk->form, Expose,
(FL_RAW_CALLBACK)do_expose);

This is my callback function. Should it have been defined as returning
type FL_RAW_CALLBACK? I had to cast it to get rid of the warning from the
fl_register_raw_callback call.

int do_expose(XEvent *ppXEvent, void **ppParm2)
{
char Str0[150];
sprintf(Str0, "Event type: %d, expose type: %d",
ppXEvent->type, ppXEvent->xexpose.type);
fl_show_messages(Str0);
return 0;
}

The problem I am having is twofold.

First, no matter what I do or click on, both event and expose type always
come up as 50304.

Second, no matter what I do, the function do_expose is the only callback
called. All button, slider, etc callbacks are seemingly masked, even
though the function returns 0 instead of FL_PREEMPT.

Can anybody tell me what I'm misunderstanding or doing wrong?

Just for reference, the definitions out of Xlib.h are:

typedef union _XEvent {
int type;
XExposeEvent xexpose;
...
} XEvent;

typedef struct {
int type;
...
} XExposeEvent;

_\||/_
/ ^ ^ \
Francine Taylor (\| (o)(o) |/) crystalx@teleport.com
-------------------------OOOo--oo--oOOO------------------------------

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/