sqweek / dialog

Simple cross-platform dialog API for go-lang
ISC License
516 stars 78 forks source link

linux: lazy call XInitThreads #75

Open Adphi opened 1 year ago

Adphi commented 1 year ago

This prevents a program that can run as a command line tool from displaying "Unable to init server: Could not connect: Connection refused".

sqweek commented 1 year ago

I looked at this PR when you first opened it and was going to do something with it but I haven't had much bandwidth lately sorry.

Thanks for your work! The change makes sense, but I'd like to take it a bit further before landing it:

  1. rename checkStatus() to lazyInit() or similar
  2. drop the initSuccess global (ie. panic() within the lazy init block that calls gtk_init_check)