[comp.windows.x.motif] Catching double-clicks, mouse movement, etc.

giguere@csg.UWaterloo.CA (Eric Giguere) (07/11/90)

First of all, thanks to those of you who answered my question about catching
exit events.  It works exactly as you said it would.

Anyhow, I have another problem.  I've set up my application's main window.
I want to receive all the user's keyboard and mouse events, including
double-click events.  I can and am using the Xt callback routines to
handle KeyPress, ButtonPress, ButtonRelease and MotionNotify events.  I have
a feeling that I may have gone too "deep" into X because this doesn't allow
me to catch double-click events without actually waiting for two successive
button events.  

So I went hunting through the Motif Programmer's Guide.  On page 7-7 of
Section I (Toolkit) they show how to add a callback function for the
XmNdefaultActionCallback.  Unfortunately I couldn't find any other reference
to this or similar callbacks in either the MPG or the MPR.  I suspect if
I implement this callback I'll catch double-clicks but they'll still filter
down to my program as two single-click events.

Personally I find the Motif documentation to be quite horrible.  If anyone
could point me in the right direction I'd be immensely grateful.  (Note:  my
situation requires me to catch ALL keyboard and mouse events in the main
window and convert them to another format... this is why I resorted to the
lower-level X calls.  Also I have books on X that describe how to do these
things!)

--
Eric Giguere                                       giguere@csg.UWaterloo.CA