[comp.windows.x] Grab puzzler

Kimbrough@dsg.csc.ti.COM (Kerry Kimbrough) (12/14/89)

Riddle me this, Xperts --- R3 server bug or pilot error? This is a case of not
getting the expected events during an active button grab. But why?

The scenario: user presses on button window B to pop up menu window M.  The
pointer is now grabbed by B with owner-events False.  The event masks of both B
and M have previously been set to select for EnterWindow.  Therefore, when the
user moves the pointer (with the pointer button still pressed) off B and onto M,
an EnterWindow event should be reported to B, i.e.  as a result of entering M.
But it isn't.  Why?

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (12/14/89)

    The event masks of both B
    and M have previously been set to select for EnterWindow.

For a grab with owner-events False, what matters is the event-mask used
in the GrabButton call, not the normal event-mask of the window.  Does
that mask have enter/leave selected for?

    Therefore, when the user moves the pointer (with the pointer button still
    pressed) off B and onto M, an EnterWindow event should be reported to B,
    i.e.  as a result of entering M.

Hmm, nope.  You'll get a Leave event when you leave B, but enter/leave events
on other windows aren't forwarded to B.  The protocol document probably isn't
very clear on this point.