Tue, 11 Jun 2024 21:49:26 +0200
fix background jobs (GTK)
application/main.c | file | annotate | diff | comparison | revisions | |
ui/gtk/toolkit.c | file | annotate | diff | comparison | revisions |
--- a/application/main.c Tue Jun 11 21:49:13 2024 +0200 +++ b/application/main.c Tue Jun 11 21:49:26 2024 +0200 @@ -102,7 +102,7 @@ } void application_startup(UiEvent *event, void *data) { - + UiObject *obj = ui_window("Test", NULL); MyDocument *doc = create_doc();
--- a/ui/gtk/toolkit.c Tue Jun 11 21:49:13 2024 +0200 +++ b/ui/gtk/toolkit.c Tue Jun 11 21:49:26 2024 +0200 @@ -185,8 +185,10 @@ static void* ui_jobthread(void *data) { UiJob *job = data; int result = job->job_func(job->job_data); - if(!result) { + if(!result && job->finish_callback) { g_idle_add(ui_job_finished, job); + } else { + free(job); } return NULL; }