[comp.windows.x] semantic confusion about grabs

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (10/26/87)

    Date: Sun, 25 Oct 87 18:26:33 PST
    From: deboor%bay.Berkeley.EDU@berkeley.edu (Adam R de Boor)

    SYNOPSIS:
	    Frozen devices are supposed to remain frozen beyond the life of the
	    grab that froze them (at least, that's what I get from the definition
	    of GrabPointer in the protocol spec: "If keyboard-mode is Synchronous,
	    the keyboard (as seen via the protocol) appears to freeze, and no
	    further keyboard events are generated by the server until the grabbing
	    client issues a releasing AllowEvents request.") This is manifestly
	    not implemented in events.c.
    REPEAT-BY:
	    Grab a button with keyboard_mode GrabModeSync, suspend the client,
	    press the button and release it, then type. The keystrokes will
	    continue to be transmitted, in spite of the fact that the keyboard
	    is supposed to remain frozen until the grabbing client has explicitly
	    issued an XAllowEvents request.

The intent of the protocol from the start was that the release of a grab
also undid any freeze it had caused on the other device.  Early versions
tried to describe this explicitly in terms of AllowEvents requests, but
that changed with time.  Apparently something got lost in the
translation.  I believe the implementation is correct (I was the last
one to rewrite those routines, and I tested them a fair amount).  I will
assume, unless I hear otherwise from significant people, that what needs
fixing is the wording in the spec.