pitman@secs.ucsc.edu (PITMAN) (09/18/90)
I'm new to X and I'm using Decwindows on a VAX with VMS 5.1. I've been trying to get dynamic rotation to work and have thus far not been successful. The problem is with sychronization, the server gets behind the client and when the user tries stops the continuous rotation the server keeps rotating the object until its queue has processesed all the requests the client issued. I thought XSync(dpy,0) was supposed to alleviate this problem but but the problem is still there. I've also tried making round trip requests such as XGetGeometry after each XDrawSeqments command and that didn't work either. I even tried sleep(1) but that made the whole process intolerably slow (it's too slow already) and the problem is still there. The event loop is: void handletheevents( ) { XEvent event; long mask; mask = ExposureMask | ButtonPressMask | KeyPressMask; while (1) { if (XCheckMaskEvent(dpy,mask,&event)) { switch (event.type) { case Expose: doExpose(&event); break; case ButtonPress: doButtonPress(&event); break; case KeyPress: doKeyPress(&event); break; } } if (orbit) { float r; r=drot/3; yrot(&r); transform(&pointsmat,&molecule.na,&tpointsmat); drawmol(); XSync(dpy,0); } } } If anybody has any idea what to do I would greatly appreciate it. Please post or email to: Pitman@secs.ucsc.edu Thanx in advance Mike Pitman Dept. of Chemistry University of California, Santa Cruz Pitman@secs.ucsc.edu