Howdy,
I tried this: (I tried the XtAddEventHandler before and after MagellanInit)
XtAddEventHandler(glWidget,NoEventMask,True,myEventHandler,0);
if ( !MagellanInit( dpy, glWidget ) )
{
fprintf( stderr, "No driver is running. \n" );
}
XtAppMainLoop(app);
return 1;
. . .
MagellanInit succeeds, but myEventHandler never gets called. Any suggestions?
Thanks!
Kula
How do I use in an Xt app?
Moderator: Moderators
It Works Now!
I waited around and worked on another project, but after reading the Xt source code!! the path was clear (I guess nobody is writing an Xt based Linux app?)
The trick is to use XtSetEventDispatcher(dpy, ClientMessage, myDispatcher)
instead of XtAddEventHandler.
myDispatcher is only called when the XEvent is ClientMessage and then its copy and paste from the sample app's ClientMessage handler.
I think there's a problem using XtAddEventHandler for non-maskable events?
The trick is to use XtSetEventDispatcher(dpy, ClientMessage, myDispatcher)
instead of XtAddEventHandler.
myDispatcher is only called when the XEvent is ClientMessage and then its copy and paste from the sample app's ClientMessage handler.
I think there's a problem using XtAddEventHandler for non-maskable events?