Refresh

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Refresh

Submitted by Anonymous on Sat, 03/10/2001 - 14:50. Developers
how to refresh a window when my program does lots of works in background ?
(sorry for my english, i`m french)

Anonymous

Si les traitements sont autres que des evenements X, il faut de temps en temps appeler les fonctions de traitement des ?v?nements X (XtDispatchEvent, XtProcessEvent).
Sinon utilise XFlush pour forcer le traitment des ?v?nements X en cours.

ICS_support

Pardon my French, or lack of it.

XFlush() merely flushes requests to the X server. It does not handle those events.

XmUpdateDisplay() handles exposure (and only exposure) events.

There is an article about another approach at http//www.motifzone.com/tmd/articles/quick_flush/refresh.html , but pay attention to the caveats.

The best solution is to break the problem up into smaller chunks, so that the application isn`t computation-bound. These chunks can be put into work procedures (see http//www.motifzone.com/resources/man/XtAppAddWorkProc.html). Or, the lengthy computation can be put into a separate process or a separate thread.