From 3bcddd5b4cb7fc0f62788912a0f454fbd1e104fd Mon Sep 17 00:00:00 2001 From: Travis McLane Date: Wed, 19 Jan 2022 13:36:44 -0600 Subject: [PATCH] add function argument to ExecuteOnMainThread --- v2/internal/frontend/desktop/linux/window.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/internal/frontend/desktop/linux/window.go b/v2/internal/frontend/desktop/linux/window.go index bfba803ad..906af4f78 100644 --- a/v2/internal/frontend/desktop/linux/window.go +++ b/v2/internal/frontend/desktop/linux/window.go @@ -196,8 +196,8 @@ int executeJS(gpointer data) { return G_SOURCE_REMOVE; } -void ExecuteOnMainThread(JSCallback* jscallback) { - g_idle_add((GSourceFunc)executeJS, (gpointer)jscallback); +void ExecuteOnMainThread(void* f, JSCallback* jscallback) { + g_idle_add((GSourceFunc)f, (gpointer)jscallback); } void extern processOpenFileResult(char*); @@ -443,7 +443,7 @@ func (w *Window) ExecJS(js string) { webview: w.webview, script: C.CString(js), } - C.ExecuteOnMainThread(&jscallback) + C.ExecuteOnMainThread(C.executeJS, &jscallback) } func (w *Window) StartDrag() {