Re: XForms: clearing the window once again

Tristan Savatier (tristan@mpegtv.com)
Fri, 30 Jan 1998 13:57:48 -0800

# To subscribers of the xforms list from Tristan Savatier <tristan@mpegtv.com> :

AMIT BHATNAGAR wrote:
>
> can anyone see anything wrong with this?
>
> void
> clear(FL_OBJECT *test, long x)
> {
> printf ("In the clear callback\n");
> XSetBackground (display, xgc, WhitePixel (display, screen));
> XClearWindow(display, fl_get_canvas_id(fdui->viewport));
> }
>
[snip]
>
> it simply doesn't clear my window..

Make sure that you call XFlush(display) after XClearWindow().
If you don't, the message may be queued and received
by the X server later.

You do not have to call XFlush() unless you want the commands
to be received by the Server with no delay. calling XFlush() after every
Xlib call would be useless and would reduce performance,
but in some cases calling XFlush.

-t
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/