The X Window System generates an EnterWindow event whenever the pointer crosses into your widget. In order to get the proper traversal behavior, whatever action is bound to EnterWindow needs to call the PrimitiveEnter action of XmPrimitive. This action encapsulates the appropriate Motif response to an EnterWindow event. In short, this action does the following:
The simplest way to invoke PrimitiveEnter is to associate it with EnterWindow in the actions array as follows:
static XtActionsRec ActionsList[] = { {"Enter", PrimitiveEnter}, ... }
If your widget requires special behavior on an EnterWindow, then your widget's EnterWindow action should envelop PrimitiveEnter. For example, the following action reacts properly:
MyEnterEventMethod(Widget w, XEvent *event, String *params, Cardinal *num_params) { /* special behavior on <EnterWindow> */ ... /* Call the PrimitiveEnter function. */ XtCallActionProc(w, "PrimitiveEnter", event, params, num_params); }