--- a/dlgs_linux.go +++ b/dlgs_linux.go @@ -1,8 +1,9 @@ package dialog -// #cgo pkg-config: gtk+-3.0 +// #cgo pkg-config: gtk+-3.0 x11 // #include // #include +// #include // static GtkWidget* msgdlg(GtkWindow *parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, char *msg) { // return gtk_message_dialog_new(parent, flags, type, buttons, "%s", msg); // } @@ -13,6 +14,7 @@ import "unsafe" func init() { + C.XInitThreads() C.gtk_init(nil, nil) }