[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
| Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 | 
| Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit | 
| Moderator: | STAR::VATNE | 
|  | 
| Created: | Mon Oct 30 1989 | 
| Last Modified: | Mon Dec 31 1990 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 3726 | 
| Total number of notes: | 19516 | 
3348.0. "fatal xlib error in XsendEvent" by TAV02::GAN () Sun Sep 16 1990 03:58
One of our customers is trying to use the XSendEvent routine.
He gets a FATAL XLIB ERROR when he uses it. He is probably
doing some programming error. As an example he added a few lines
to the HELLOWORLD.C to show the problem. I am posting here
the lines he added to that small application:
The following lines to be included in HELLOWORLD.C:
	.
	.
	.
static void helloworld_button_activate( widget, tag, callback_data )
	Widget	widget;
	char    *tag;
	DwtAnyCallbackStruct *callback_data;
{
    Arg arglist[2];
    static int call_count = 0;
/***************************************************/
/* Here starts the added lines to HELLOWORLD.C     */
/* The XsendEvent option entered here just to      */
/* demonstrate the Xlib error 			   */
/***************************************************/
	XClientMessageEvent ev;
	ev.type = ClientMessage;
	ev.display = XtDisplay(widget);
	ev.window = XtWindow(widget);
	ev.message_type = 0;
	ev.format = 0;
	XSendEvent(XtDisplay(widget), XtWindow(widget),
		False, NoEventMask, (XEvent *)&ev);
/***************************************************/
/*  End of added code to Helloworld.               */
/***************************************************/
    call_count += 1 ;
    switch ( call_count )
        {
        case 1:
            XtSetArg( arglist[0], DwtNlabel,
                DwtLatin1String("Goodbye\nWorld!") );
            XtSetArg( arglist[1], DwtNx, 11 );  
            XtSetValues( widget, arglist, 2 );
            break ;
        case 2:
            exit(1);
            break ;
        }
}
| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|
| 3348.1 |  | OXNARD::KLEE | Ken Lee | Mon Sep 17 1990 13:55 | 4 | 
|  |     ev.format = 0 is an invalid ClientMessage format.  The format must be
    8, 16, or 32.
    
    Ken
 |