[comp.windows.x] ``after function''

net@TUB.BITNET (Oliver Laumann) (07/03/88)

The Xlib documentation does not mention how an ``after function'' that has
been defined for a display by a call to XSetAfterFunction() can be
de-registered at a later point of time.  From looking at the sources I
gather that this can be done by calling either

    XSynchronize (dpy, 0);

or

    XSetAfterFunction (dpy, (int (*)())0).

What is the preferred way?  Why is this not documented?  Or is the user
not assumed to remove an ``after function'' once it has been set?

Thanks in advance.

--
Oliver Laumann              net@TUB.BITNET              net@tub.UUCP

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (07/05/88)

    Date: Sun, 3 Jul 88 15:36:11 +0200
    From: Oliver Laumann <net%TUB.BITNET@mitvma.mit.edu>

	XSynchronize (dpy, 0);
    or
	XSetAfterFunction (dpy, (int (*)())0).

    What is the preferred way?

Either way is fine.  Note that both of these functions return
the previous after-function, so another way to undo is to save
the previous value and then store it back with XSetAfterFunction.

    Why is this not documented?

Because no one noticed that it wasn't documented until now.
Thank you for pointing it out.