Flush a context, given a context and a set of flags.
#include <screen/screen.h>
int screen_flush_context(screen_context_t ctx, int flags)
The connection to Screen that is to be flushed. This context must have been created with screen_create_context().
The flag to indicate whether or not to wait until contents of all displays have been updated or to execute immediately.
Function type: Apply Execution
This function flushes any delayed command and causes the contents of displays to be updated, when applicable. If SCREEN_WAIT_IDLE is specified, the function will not return until the contents of all affected displays have been updated. Passing no flags causes the function to return immediately.
If debugging, you can call this function after all delayed execution function calls as a way to determine the exact function call which may have caused an error.
0 if the context was flushed, or -1 if an error occurred (errno is set; refer to /usr/include/errno.h for more details). Note that the error may also have been caused by any delayed execution function that's just been flushed.