ui/motif/toolkit.c

changeset 1042
f3e2811ecf3a
parent 996
61b811c4705f
child 1045
e855396fd839
equal deleted inserted replaced
1041:db47e814b4c5 1042:f3e2811ecf3a
219 } 219 }
220 return NULL; 220 return NULL;
221 } 221 }
222 222
223 void ui_call_mainthread(ui_threadfunc tf, void* td) { 223 void ui_call_mainthread(ui_threadfunc tf, void* td) {
224 if(uic_mainthread_calls_is_buffered()) {
225 uic_add_buffered_mainthread_call(tf, td);
226 return;
227 }
228
224 UiJob *job = malloc(sizeof(UiJob)); 229 UiJob *job = malloc(sizeof(UiJob));
225 memset(job, 0, sizeof(UiJob)); 230 memset(job, 0, sizeof(UiJob));
226 job->job_func = tf; 231 job->job_func = tf;
227 job->job_data = td; 232 job->job_data = td;
228 write(event_pipe[1], &job, sizeof(void*)); // hack 233 write(event_pipe[1], &job, sizeof(void*)); // hack

mercurial