|
From: Dave D. <dde...@es...> - 2004-09-06 22:25:42
|
Daniel J Sebald <dan...@ie...> writes: > Yes, seen that.... I understand that X windows are fundamentally the > same, but obviously something isn't right here. Perhaps it has > something to do with the input/output you mention... The only extra > bit of info I can provide is that the window that gnuplot_x11 connects > to doesn't die until in the main loop. (That doesn't mean what was > done in pr_window() isn't the cause of the failure... just that it > doesn't manifest itself untill later... *perhaps*.) It is the > commands XFlush() and XPending() that cause the exterior window to > crash. But notice those only have the display as an input. Could it > be that those commands have to do with input/output, and the exterior > X window is not input/output? But that doesn't make sense, X wouldn't > be set up to be so fragile. > Ah - bear in mind that Xlib tends to buffer everything up until XFlush(). So it is only when you XFlush() that *all* the other activity happens ! There is a mode you can set to make xlib synchronous. XSynchronize(dpy, 1); what that does is that after every xlib call, it does an XSync() to force a round-trip request. Any errors caused by the request (or other side effects such as crashing other client !) are gauranteed to happen before the xlib call completes. dd -- Dave Denholm <dde...@es...> http://www.esmertec.com |