add function argument to ExecuteOnMainThread

This commit is contained in:
Travis McLane
2022-01-25 16:27:39 -06:00
parent b11964f0eb
commit 3bcddd5b4c
+3 -3
View File
@@ -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() {